sr-npm 1.7.277 → 1.7.278
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pages/careersPage.js +5 -13
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -18,7 +18,6 @@ const {
|
|
|
18
18
|
let queryKeyWordVar;
|
|
19
19
|
let queryDepartmentVar;
|
|
20
20
|
let queryLocationVar;
|
|
21
|
-
let searchInputIsUsed=false;
|
|
22
21
|
async function careersPageOnReady(_$w,thisObject,queryParams) {
|
|
23
22
|
console.log("queryParams: ", queryParams);
|
|
24
23
|
const { page, keyWord, department, location } = queryParams;
|
|
@@ -161,14 +160,12 @@ async function bind(_$w) {
|
|
|
161
160
|
}
|
|
162
161
|
|
|
163
162
|
function init(_$w) {
|
|
164
|
-
const debouncedSearch = debounce(()=>
|
|
165
|
-
{
|
|
166
|
-
applyFilters(_$w);
|
|
167
|
-
_$w('#searchInput').focus();
|
|
168
|
-
}, 400,thisObjectVar);
|
|
163
|
+
const debouncedSearch = debounce(()=>applyFilters(_$w), 400,thisObjectVar);
|
|
169
164
|
_$w('#searchInput').onInput(debouncedSearch);
|
|
170
|
-
_$w('#searchInput').
|
|
171
|
-
|
|
165
|
+
_$w('#searchInput').onBlur(()=>{
|
|
166
|
+
console.log("search input blurred");
|
|
167
|
+
_$w('#searchInput').focus();
|
|
168
|
+
});
|
|
172
169
|
_$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(()=>applyFilters(_$w));
|
|
173
170
|
_$w('#resetFiltersButton, #clearSearch').onClick(()=>resetFilters(_$w));
|
|
174
171
|
|
|
@@ -266,11 +263,6 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
266
263
|
// Update reset button state
|
|
267
264
|
const hasActiveFilters = filters.length > 0;
|
|
268
265
|
hasActiveFilters? _$w('#resetFiltersButton').enable() : _$w('#resetFiltersButton').disable();
|
|
269
|
-
if(searchInputIsUsed){
|
|
270
|
-
console.log("focusing search input");
|
|
271
|
-
_$w('#searchInput').focus();
|
|
272
|
-
console.log("search input focused");
|
|
273
|
-
}
|
|
274
266
|
|
|
275
267
|
|
|
276
268
|
}
|