@antscorp/antsomi-ui 1.3.5-beta.705 → 1.3.5-beta.706

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.
@@ -194,11 +194,18 @@ export function MatchesAny(props) {
194
194
  children: serializeTreeData(item.children),
195
195
  }));
196
196
  });
197
+ // Handle add load more item for serve load more
197
198
  let treeData = serializeTreeData(results);
198
199
  // Filter the tree data based on the group selected items
199
200
  if (groupSelectProps && ((_a = groupSelectProps.selected) === null || _a === void 0 ? void 0 : _a.length)) {
200
201
  treeData = treeData.filter(item => { var _a; return (_a = groupSelectProps.selected) === null || _a === void 0 ? void 0 : _a.includes(item.key); });
201
202
  }
203
+ treeData = treeData.concat({
204
+ key: 'load-more',
205
+ title: '',
206
+ isLoadMore: true,
207
+ className: 'load-more-node',
208
+ });
202
209
  return { treeData, matchedParents };
203
210
  // eslint-disable-next-line react-hooks/exhaustive-deps
204
211
  }, [items, searchValue, selectedItems, groupSelectProps, onChangeSearch]);
@@ -244,10 +251,10 @@ export function MatchesAny(props) {
244
251
  : items === null || items === void 0 ? void 0 : items.map(item => item.key), selectable: false, treeData: treeData, switcherIcon: props => (React.createElement(Icon, { type: "icon-ants-caret-down", style: {
245
252
  transform: props.expanded ? 'rotate(0)' : 'rotate(-90deg)',
246
253
  transition: 'transform 0.3s ease',
247
- }, color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.bw8 })), titleRender: item => renderItemNodeTitle({
248
- item: item,
254
+ }, color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.bw8 })), titleRender: (item) => isShowLoadMoreEl && item.isLoadMore ? (React.createElement("div", { ref: loadMoreRef })) : (renderItemNodeTitle({
255
+ item,
249
256
  onSelectItem,
250
- }), height: 396 }),
257
+ })), height: 396 }),
251
258
  isShowLoadMoreEl && React.createElement("div", { ref: loadMoreRef }))) : (React.createElement(EmptyData, Object.assign({ icon: listEmptyIcon, showIcon: !!listEmptyIcon, description: listEmptyDescription }, restListEmptyProps)))))));
252
259
  };
253
260
  const renderSelectedList = () => (React.createElement("div", { className: "matches-any__section" },
@@ -203,6 +203,12 @@ export const MatchesAnyWrapper = styled(Flex) `
203
203
  }
204
204
  }
205
205
  }
206
+
207
+ &.load-more-node {
208
+ overflow: hidden;
209
+ height: 0px !important;
210
+ padding: 0px !important;
211
+ }
206
212
  }
207
213
  }
208
214
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.705",
3
+ "version": "1.3.5-beta.706",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",