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