sr-npm 1.7.1288 → 1.7.1290

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.1288",
3
+ "version": "1.7.1290",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -62,10 +62,8 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
62
62
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.CLEAR_ALL_BUTTON_ID).onClick(async () => {
63
63
  await clearAll(_$w);
64
64
  });
65
- const formFactor = await window.formFactor();
66
- if (formFactor === "Mobile" || formFactor === "Tablet") {
67
- handleFilterInMobile(_$w);
68
- }
65
+
66
+ handleFilterButton(_$w,await window.formFactor());
69
67
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_MULTI_STATE_BOX).changeState("results");
70
68
  }
71
69
 
@@ -106,7 +104,7 @@ async function clearAll(_$w,urlOnChange=false) {
106
104
 
107
105
  }
108
106
 
109
- function handleFilterInMobile(_$w) {
107
+ function handleFilterButton(_$w,formFactor) {
110
108
  const searchResultsSelectors = [
111
109
  CAREERS_PAGE_SELECTORS.RESULT_BOX,
112
110
  CAREERS_PAGE_SELECTORS.PAGINATION_BTN,
@@ -151,9 +149,11 @@ function handleFilterInMobile(_$w) {
151
149
  });
152
150
 
153
151
  //onmobile we should collapse the filter box and the refine search button by default
154
- mobileFilterBoxSelectors.forEach(selector => {
155
- _$w(selector).collapse();
156
- });
152
+ if(formFactor === "Mobile" || formFactor === "Tablet") {
153
+ mobileFilterBoxSelectors.forEach(selector => {
154
+ _$w(selector).collapse();
155
+ });
156
+ }
157
157
  }
158
158
 
159
159