sr-npm 1.7.1267 → 1.7.1269
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
|
@@ -39,7 +39,7 @@ let secondarySearchIsFilled=false // whether the secondary search is filled with
|
|
|
39
39
|
let keywordAllJobs; // all jobs that are displayed in the jobs repeater when the keyword is filled
|
|
40
40
|
let ActivateURLOnchange=true; // whether to activate the url onchange
|
|
41
41
|
let considerAllJobs=false; // whether to consider all jobs or not
|
|
42
|
-
|
|
42
|
+
let finishedUrlOnChange=false;
|
|
43
43
|
const pagination = {
|
|
44
44
|
pageSize: 10,
|
|
45
45
|
currentPage: 1,
|
|
@@ -48,7 +48,8 @@ const pagination = {
|
|
|
48
48
|
async function careersMultiBoxesPageOnReady(_$w,urlParams) {
|
|
49
49
|
//to handle back and forth , url changes
|
|
50
50
|
onChange(async ()=>{
|
|
51
|
-
await handleBackAndForth(_$w);
|
|
51
|
+
finishedUrlOnChange? finishedUrlOnChange=false : await handleBackAndForth(_$w);
|
|
52
|
+
|
|
52
53
|
});
|
|
53
54
|
await loadData(_$w);
|
|
54
55
|
await loadJobsRepeater(_$w); // if we remove the await here the job list will be flaky , it doesn't fill it properly
|
|
@@ -75,8 +76,9 @@ async function handleBackAndForth(_$w){
|
|
|
75
76
|
ActivateURLOnchange=false;
|
|
76
77
|
await clearAll(_$w,true);
|
|
77
78
|
await handleUrlParams(_$w,newQueryParams,true);
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
ActivateURLOnchange=true;
|
|
80
|
+
|
|
81
|
+
|
|
80
82
|
}
|
|
81
83
|
else{
|
|
82
84
|
ActivateURLOnchange=true;
|
|
@@ -206,6 +208,11 @@ async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {
|
|
|
206
208
|
const jobsFirstPage=currentJobs.slice(startSlicIndex,endSlicIndex);
|
|
207
209
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
208
210
|
handlePaginationButtons(_$w);
|
|
211
|
+
if(!ActivateURLOnchange)
|
|
212
|
+
{
|
|
213
|
+
finishedUrlOnChange=true;
|
|
214
|
+
}
|
|
215
|
+
|
|
209
216
|
}
|
|
210
217
|
} catch (error) {
|
|
211
218
|
console.error('Failed to handle url params:', error);
|