@hi-ui/input 4.0.0-beta.11 → 4.0.0-beta.12

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.
@@ -34,7 +34,7 @@ export declare const MockInput: React.ForwardRefExoticComponent<Omit<Pick<React.
34
34
  /**
35
35
  * 自定义选择后触发器所展示的内容
36
36
  */
37
- displayRender?: ((item: HiBaseDataItem) => React.ReactNode) | undefined;
37
+ displayRender?: ((item: MockInputDataItem) => React.ReactNode) | undefined;
38
38
  /**
39
39
  * 输入框占位符
40
40
  */
@@ -50,7 +50,7 @@ export declare const MockInput: React.ForwardRefExoticComponent<Omit<Pick<React.
50
50
  /**
51
51
  * 展示数据源
52
52
  */
53
- data?: HiBaseDataItem[] | undefined;
53
+ data?: MockInputDataItem[] | undefined;
54
54
  /**
55
55
  * 是否聚焦
56
56
  */
@@ -70,6 +70,16 @@ export declare const MockInput: React.ForwardRefExoticComponent<Omit<Pick<React.
70
70
  } & {
71
71
  invalid?: boolean | undefined;
72
72
  } & React.RefAttributes<HTMLDivElement | null>>;
73
+ export interface MockInputDataItem extends HiBaseDataItem {
74
+ /**
75
+ * 节点 id
76
+ */
77
+ id: React.ReactText;
78
+ /**
79
+ * 节点标题
80
+ */
81
+ title: React.ReactNode;
82
+ }
73
83
  export declare type MockInputProps = HiBaseHTMLFieldProps<'div', {
74
84
  /**
75
85
  * 设置当前多选值
@@ -98,7 +108,7 @@ export declare type MockInputProps = HiBaseHTMLFieldProps<'div', {
98
108
  /**
99
109
  * 自定义选择后触发器所展示的内容
100
110
  */
101
- displayRender?: (item: HiBaseDataItem) => React.ReactNode;
111
+ displayRender?: (item: MockInputDataItem) => React.ReactNode;
102
112
  /**
103
113
  * 输入框占位符
104
114
  */
@@ -114,7 +124,7 @@ export declare type MockInputProps = HiBaseHTMLFieldProps<'div', {
114
124
  /**
115
125
  * 展示数据源
116
126
  */
117
- data?: HiBaseDataItem[];
127
+ data?: MockInputDataItem[];
118
128
  /**
119
129
  * 是否聚焦
120
130
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/input",
3
- "version": "4.0.0-beta.11",
3
+ "version": "4.0.0-beta.12",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HIUI <mi-hiui@xiaomi.com>",
@@ -44,11 +44,11 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@hi-ui/classname": "^4.0.0-beta.0",
47
- "@hi-ui/core": "^4.0.0-beta.6",
47
+ "@hi-ui/core": "^4.0.0-beta.7",
48
48
  "@hi-ui/core-css": "^4.0.0-beta.4",
49
49
  "@hi-ui/dom-utils": "^4.0.0-beta.4",
50
50
  "@hi-ui/env": "^4.0.0-beta.0",
51
- "@hi-ui/icons": "^4.0.0-beta.8",
51
+ "@hi-ui/icons": "^4.0.0-beta.9",
52
52
  "@hi-ui/use-latest": "^4.0.0-beta.3",
53
53
  "@hi-ui/use-merge-refs": "^4.0.0-beta.3",
54
54
  "@hi-ui/use-uncontrolled-state": "^4.0.0-beta.3"
@@ -62,5 +62,5 @@
62
62
  "react": "^17.0.1",
63
63
  "react-dom": "^17.0.1"
64
64
  },
65
- "gitHead": "b97da7b6da8a53833e194290558af1c460f5de16"
65
+ "gitHead": "a7ee16f069a3d2a3396d497e932f834e2701882e"
66
66
  }