@jswork/antd-components 1.0.91 → 1.0.92
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/dist/main.cjs.js +1 -1
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.esm.js +1 -1
- package/dist/main.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/lib/select.tsx +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jswork/antd-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.92",
|
|
4
4
|
"main": "dist/main.cjs.js",
|
|
5
5
|
"module": "dist/main.esm.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@jswork/next-tree-walk": "^1.0.7",
|
|
46
46
|
"@jswork/noop": "^1.0.0",
|
|
47
47
|
"@jswork/react-codeflask": "^1.1.2",
|
|
48
|
-
"@jswork/react-list": "^1.2.
|
|
48
|
+
"@jswork/react-list": "^1.2.11",
|
|
49
49
|
"@jswork/weibo2res": "^1.0.4",
|
|
50
50
|
"fast-deep-equal": "^3.1.3",
|
|
51
51
|
"nanoid": "^4.0.2",
|
package/src/lib/select.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { selectKv, kv as KvTmpl } from '../tpls/kv';
|
|
|
8
8
|
const CLASS_NAME = 'ac-select';
|
|
9
9
|
const DEFAULT_KV = {
|
|
10
10
|
label: 'label',
|
|
11
|
-
value: 'value'
|
|
11
|
+
value: 'value'
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
type StdEventTarget = { target: { value: any } };
|
|
@@ -33,11 +33,11 @@ export class AcSelect extends React.Component<Props> {
|
|
|
33
33
|
kv: DEFAULT_KV,
|
|
34
34
|
template: selectKv,
|
|
35
35
|
onChange: noop,
|
|
36
|
-
onSearch: noop
|
|
36
|
+
onSearch: noop
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
state = {
|
|
40
|
-
value: this.props.value
|
|
40
|
+
value: this.props.value
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
shouldComponentUpdate(nextProps: Readonly<Props>): boolean {
|
|
@@ -64,7 +64,7 @@ export class AcSelect extends React.Component<Props> {
|
|
|
64
64
|
if (kv === DEFAULT_KV) return template!(args);
|
|
65
65
|
return KvTmpl(args, {
|
|
66
66
|
component: Select.Option,
|
|
67
|
-
...kv
|
|
67
|
+
...kv
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -73,6 +73,7 @@ export class AcSelect extends React.Component<Props> {
|
|
|
73
73
|
const { value: _value } = this.state;
|
|
74
74
|
return (
|
|
75
75
|
<ReactList
|
|
76
|
+
allowEmpty
|
|
76
77
|
as={Select}
|
|
77
78
|
onChange={this.handleChange}
|
|
78
79
|
className={cx(CLASS_NAME, className)}
|