zs_library 0.6.17 → 0.6.19

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.
@@ -38,6 +38,11 @@ export interface SortableConfig<D, C> {
38
38
  * 自定义 item 渲染
39
39
  */
40
40
  itemBuilder?: (item: SortItem<D, C>) => React.ReactNode;
41
+ /**
42
+ * 自定义 item 渲染(允许返回 null 以回退到默认渲染)
43
+ * 当返回值为 null 或 undefined 时,将继续执行下方的默认 switch 渲染逻辑
44
+ */
45
+ itemBuilderAllowNull?: (item: SortItem<D, C>) => React.ReactNode;
41
46
  /**
42
47
  * 自定义 item 图标渲染
43
48
  */
@@ -8,6 +8,7 @@ export declare const useSortableConfig: () => {
8
8
  pagingDotsBuilder?: (dots: React.ReactNode) => React.JSX.Element;
9
9
  pagingDotBuilder?: ((item: import('../..').ListItem<any, any>, index: number, isActive: boolean) => React.JSX.Element) | undefined;
10
10
  itemBuilder?: ((item: import('../..').SortItem<any, any>) => React.ReactNode) | undefined;
11
+ itemBuilderAllowNull?: ((item: import('../..').SortItem<any, any>) => React.ReactNode) | undefined;
11
12
  itemIconBuilder?: ((item: import('../..').SortItem<any, any>) => React.ReactNode) | undefined;
12
13
  contextMenuBuilder?: ((data: import('../..').SortItem<any, any>) => import('../../context-menu').ContextMenuProps<any, any>) | undefined;
13
14
  };