@hi-ui/cascader 4.0.0-alpha.22 → 4.0.0-alpha.26

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/README.md CHANGED
@@ -40,6 +40,7 @@
40
40
  | titleRender | 自定义渲染节点的 title 内容径 | (item: CascaderItemEventData, flatted: boolean) => React.ReactNode | - |
41
41
  | filterOption | 自定义搜索过滤器,仅在 searchable 为 true 时有效。第一个参数为输入的关键字,第二个为数据项,返回值为 true 时将出现在结果项 | (keyword: string, item: CascaderItemEventData) => boolean | - |
42
42
  | dataSource | 异步搜索加载数据 | (key: string) => DataSource \| DataSource \| Promise | - |
43
+ | appearance | 设置展现形式 | 'outline' \| 'unset' \| 'filled' | 'outline' |
43
44
 
44
45
  ## Events
45
46
 
@@ -55,11 +56,11 @@
55
56
 
56
57
  ### CascaderDataItem
57
58
 
58
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
59
- | -------- | -------- | ------- | ------------- | ------ |
60
- | id | 选择项值 | string | - | - |
61
- | title | 选择项 | string | - | - |
62
- | disabled | 是否禁用 | boolean | true \| false | false |
59
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
60
+ | -------- | ---------------- | --------- | ------------- | ------ |
61
+ | id | 下拉选择项唯一值 | ReactText | - | - |
62
+ | title | 下拉选择项标题 | string | - | - |
63
+ | disabled | 是否禁用 | boolean | true \| false | false |
63
64
 
64
65
  ### CascaderItemEventData
65
66
 
@@ -112,3 +113,4 @@
112
113
  | titleRender | feature | - | 统一支持自定义渲染每一项 |
113
114
  | filterOption | feature | - | 统一支持自定义过滤 |
114
115
  | dataSource | feature | - | 统一支持异步数据加载 |
116
+ | appearance | feature | - | 统一支持:线性\面性\无边框 |
@@ -62,7 +62,7 @@ export interface CascaderProps extends Omit<PickerProps, 'data' | 'onChange' | '
62
62
  /**
63
63
  * 自定义选择后触发器所展示的内容,只在 title 为字符串时有效
64
64
  */
65
- displayRender?: (checkedOption: FlattedCascaderItem, checkedOptions: FlattedCascaderItem[]) => React.ReactNode;
65
+ displayRender?: (checkedOption: FlattedCascaderItem, checkedOptionPaths: FlattedCascaderItem[]) => React.ReactNode;
66
66
  /**
67
67
  * 将选项拍平展示,不支持 `onLoadChildren` 异步加载交互
68
68
  */
@@ -289,7 +289,7 @@ export declare const CascaderProvider: import("react").Provider<Omit<{
289
289
  menuList: any[];
290
290
  isEmpty: boolean;
291
291
  placeholder: string | undefined;
292
- displayRender: ((checkedOption: import("./types").FlattedCascaderItem, checkedOptions: import("./types").FlattedCascaderItem[]) => import("react").ReactNode) | undefined;
292
+ displayRender: ((checkedOption: import("./types").FlattedCascaderItem, checkedOptionPaths: import("./types").FlattedCascaderItem[]) => import("react").ReactNode) | undefined;
293
293
  titleRender: ((item: import("./types").CascaderItemEventData, flatted: boolean) => import("react").ReactNode) | undefined;
294
294
  emptyContent: boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | null;
295
295
  getSearchInputProps: () => {
@@ -588,7 +588,7 @@ export declare const useCascaderContext: () => Omit<{
588
588
  menuList: any[];
589
589
  isEmpty: boolean;
590
590
  placeholder: string | undefined;
591
- displayRender: ((checkedOption: import("./types").FlattedCascaderItem, checkedOptions: import("./types").FlattedCascaderItem[]) => import("react").ReactNode) | undefined;
591
+ displayRender: ((checkedOption: import("./types").FlattedCascaderItem, checkedOptionPaths: import("./types").FlattedCascaderItem[]) => import("react").ReactNode) | undefined;
592
592
  titleRender: ((item: import("./types").CascaderItemEventData, flatted: boolean) => import("react").ReactNode) | undefined;
593
593
  emptyContent: boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | null;
594
594
  getSearchInputProps: () => {
@@ -291,7 +291,7 @@ export declare const useCascader: ({ defaultValue, value: valueProp, onChange: o
291
291
  menuList: any[];
292
292
  isEmpty: boolean;
293
293
  placeholder: string | undefined;
294
- displayRender: ((checkedOption: FlattedCascaderItem, checkedOptions: FlattedCascaderItem[]) => React.ReactNode) | undefined;
294
+ displayRender: ((checkedOption: FlattedCascaderItem, checkedOptionPaths: FlattedCascaderItem[]) => React.ReactNode) | undefined;
295
295
  titleRender: ((item: CascaderItemEventData, flatted: boolean) => React.ReactNode) | undefined;
296
296
  emptyContent: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null;
297
297
  getSearchInputProps: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/cascader",
3
- "version": "4.0.0-alpha.22",
3
+ "version": "4.0.0-alpha.26",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HIUI <mi-hiui@xiaomi.com>",
@@ -44,17 +44,17 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@hi-ui/classname": "^4.0.0-alpha.3",
47
- "@hi-ui/core": "^4.0.0-alpha.14",
47
+ "@hi-ui/core": "^4.0.0-alpha.15",
48
48
  "@hi-ui/env": "^4.0.0-alpha.5",
49
- "@hi-ui/icons": "^4.0.0-alpha.20",
50
- "@hi-ui/input": "^4.0.0-alpha.24",
51
- "@hi-ui/picker": "^4.0.0-alpha.8",
52
- "@hi-ui/popper": "^4.0.0-alpha.17",
53
- "@hi-ui/tree-utils": "^4.0.0-alpha.8",
49
+ "@hi-ui/icons": "^4.0.0-alpha.22",
50
+ "@hi-ui/input": "^4.0.0-alpha.26",
51
+ "@hi-ui/picker": "^4.0.0-alpha.10",
52
+ "@hi-ui/popper": "^4.0.0-alpha.18",
53
+ "@hi-ui/tree-utils": "^4.0.0-alpha.9",
54
54
  "@hi-ui/type-assertion": "^4.0.0-alpha.13",
55
55
  "@hi-ui/use-data-source": "^4.0.0-alpha.5",
56
56
  "@hi-ui/use-latest": "^4.0.0-alpha.4",
57
- "@hi-ui/use-search-mode": "^4.0.0-alpha.6",
57
+ "@hi-ui/use-search-mode": "^4.0.0-alpha.8",
58
58
  "@hi-ui/use-toggle": "^4.0.0-alpha.10",
59
59
  "@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.12",
60
60
  "lodash": "^4.17.21"
@@ -68,5 +68,5 @@
68
68
  "react": "^17.0.1",
69
69
  "react-dom": "^17.0.1"
70
70
  },
71
- "gitHead": "dbe7ec19bc067527f0cfcf8c71100619fc98cc72"
71
+ "gitHead": "4f087bc74252731d943e607074c9754426c7be77"
72
72
  }