sr-npm 1.7.81 → 1.7.82
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 -3
- package/public/filterUtils.js +2 -2
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -13,12 +13,14 @@ const {
|
|
|
13
13
|
let allJobs=[]
|
|
14
14
|
const RESET_ALL = 'RESET_ALL';
|
|
15
15
|
let pageParamSet=0;
|
|
16
|
+
let thisObjectVar;
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
async function careersPageOnReady(_$w) {
|
|
21
|
-
|
|
21
|
+
async function careersPageOnReady(_$w,thisObject) {
|
|
22
|
+
|
|
23
|
+
thisObjectVar=thisObject;
|
|
22
24
|
allJobs=await getAllPositions();
|
|
23
25
|
await handleUrlParams(_$w);
|
|
24
26
|
await activateAutoLoad(_$w);
|
|
@@ -140,7 +142,7 @@ async function bind(_$w) {
|
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
function init(_$w) {
|
|
143
|
-
const debouncedSearch = debounce(applyFilters, 400);
|
|
145
|
+
const debouncedSearch = debounce(applyFilters, 400,thisObjectVar);
|
|
144
146
|
|
|
145
147
|
_$w('#searchInput').onInput(debouncedSearch);
|
|
146
148
|
_$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(()=>applyFilters(_$w));
|
package/public/filterUtils.js
CHANGED
|
@@ -22,11 +22,11 @@ function getFilter(fieldsToSearch = [], mode = 'or') {
|
|
|
22
22
|
return filter;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function debounce(fn, delay = 400) {
|
|
25
|
+
function debounce(fn, delay = 400,thisObject) {
|
|
26
26
|
let timeout;
|
|
27
27
|
return function (...args) {
|
|
28
28
|
clearTimeout(timeout);
|
|
29
|
-
timeout = setTimeout(() => fn.apply(
|
|
29
|
+
timeout = setTimeout(() => fn.apply(thisObject, args), delay);
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|