sr-npm 1.2.35 → 1.2.36

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.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -112,6 +112,18 @@ function handleFilterInMobile(_$w) {
112
112
  });
113
113
  }
114
114
 
115
+ const q = wixData.query(collectionId).include(JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
116
+
117
+
118
+ const items = [];
119
+ let res = await q.limit(1000).find();
120
+ items.push(...res.items);
121
+
122
+ while (res.hasNext()) {
123
+ res = await res.next();
124
+ items.push(...res.items);
125
+ }
126
+ return items;
115
127
 
116
128
  async function handleUrlParams(_$w,urlParams) {
117
129
  try {
@@ -121,11 +133,20 @@ async function handleUrlParams(_$w,urlParams) {
121
133
  if(urlParams.keyword) {
122
134
  applyFiltering = await primarySearch(_$w, decodeURIComponent(urlParams.keyword));
123
135
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value = decodeURIComponent(urlParams.keyword);
124
- let data = await _$w("#jobsDataset").getItems();
125
- data = data.items || [];
126
-
127
- currentJobs = data;
128
- keywordAllJobs = data;
136
+ _$w("#jobsDataset").onReady(async () => {
137
+ let items = [];
138
+ let data = await _$w("#jobsDataset").getItems(0, 1000);
139
+ items.push(...data.items);
140
+
141
+ while (_$w("#jobsDataset").hasNext()) {
142
+ _$w("#jobsDataset").next();
143
+ const nextItems = await _$w("#jobsDataset").getItems(0, 1000);
144
+ items.push(...nextItems.items);
145
+ }
146
+
147
+ currentJobs = items;
148
+ keywordAllJobs = items;
149
+ });
129
150
  }
130
151
 
131
152
  for (const url of possibleUrlParams)