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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.81",
3
+ "version": "1.7.82",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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));
@@ -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(this, args), delay);
29
+ timeout = setTimeout(() => fn.apply(thisObject, args), delay);
30
30
  };
31
31
  }
32
32