sr-npm 1.7.275 → 1.7.277
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 +9 -2
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -161,8 +161,13 @@ async function bind(_$w) {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
function init(_$w) {
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
const debouncedSearch = debounce(()=>
|
|
165
|
+
{
|
|
166
|
+
applyFilters(_$w);
|
|
167
|
+
_$w('#searchInput').focus();
|
|
168
|
+
}, 400,thisObjectVar);
|
|
169
|
+
_$w('#searchInput').onInput(debouncedSearch);
|
|
170
|
+
_$w('#searchInput').onFocus(()=>searchInputIsUsed=true);
|
|
166
171
|
_$w('#searchInput').onBlur(()=>searchInputIsUsed=false);
|
|
167
172
|
_$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(()=>applyFilters(_$w));
|
|
168
173
|
_$w('#resetFiltersButton, #clearSearch').onClick(()=>resetFilters(_$w));
|
|
@@ -262,7 +267,9 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
262
267
|
const hasActiveFilters = filters.length > 0;
|
|
263
268
|
hasActiveFilters? _$w('#resetFiltersButton').enable() : _$w('#resetFiltersButton').disable();
|
|
264
269
|
if(searchInputIsUsed){
|
|
270
|
+
console.log("focusing search input");
|
|
265
271
|
_$w('#searchInput').focus();
|
|
272
|
+
console.log("search input focused");
|
|
266
273
|
}
|
|
267
274
|
|
|
268
275
|
|