sr-npm 1.7.746 → 1.7.748
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
|
@@ -435,15 +435,15 @@ function primarySearch(_$w,query) {
|
|
|
435
435
|
}
|
|
436
436
|
async function secondarySearch(_$w,query) {
|
|
437
437
|
console.log("secondary search query: ", query);
|
|
438
|
-
if(query.length===0 || query===undefined) {
|
|
438
|
+
if(query.length===0 || query===undefined || query==='') {
|
|
439
|
+
console.log("secondary search query is empty, resetting secondary search");
|
|
439
440
|
// allsecondarySearchJobs=currentJobs;
|
|
440
441
|
secondarySearchIsFilled=false;
|
|
442
|
+
return;
|
|
441
443
|
}
|
|
442
444
|
else {
|
|
443
445
|
allsecondarySearchJobs=currentJobs.filter(job=>job.title.toLowerCase().includes(query));
|
|
444
446
|
currentSecondarySearchJobs=allsecondarySearchJobs;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
447
|
const jobsFirstPage=allsecondarySearchJobs.slice(0,pagination.pageSize);
|
|
448
448
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
449
449
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = jobsFirstPage.length.toString();
|
|
@@ -456,6 +456,7 @@ async function secondarySearch(_$w,query) {
|
|
|
456
456
|
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("searchResult");
|
|
457
457
|
}
|
|
458
458
|
secondarySearchIsFilled=true
|
|
459
|
+
}
|
|
459
460
|
handlePaginationButtons(_$w);
|
|
460
461
|
updateTotalJobsCountText(_$w);
|
|
461
462
|
await refreshFacetCounts(_$w); //false for clearAll, true for secondarySearch
|