@kne/super-select 0.1.2 → 0.1.3

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.
@@ -2335,7 +2335,8 @@ const SelectInput = p => {
2335
2335
  }, p, {
2336
2336
  locale
2337
2337
  });
2338
- const [value, setValue] = useControlValue(props);
2338
+ const [stateValue, setValue] = useControlValue(props);
2339
+ const value = stateValue || [];
2339
2340
  const [searchText, setSearchText] = useState('');
2340
2341
  const [open, setOpen] = useState(false);
2341
2342
  const [hover, setHover] = useState(false);
@@ -2423,7 +2424,7 @@ const SelectInput = p => {
2423
2424
  }
2424
2425
  }), /*#__PURE__*/React.createElement("div", {
2425
2426
  className: classnames(style$3['select-input-inner'], 'select-input-inner')
2426
- }, (value || []).length > 0 ? single || value[0].value === selectedAllValue.value ? value[0].label : value.map(item => {
2427
+ }, value.length > 0 ? single || value[0].value === selectedAllValue.value ? value[0].label : value.map(item => {
2427
2428
  return /*#__PURE__*/React.createElement(Tag, {
2428
2429
  key: item.value,
2429
2430
  closable: true,
@@ -2437,7 +2438,7 @@ const SelectInput = p => {
2437
2438
  className: classnames(style$3['placeholder'], 'select-input-placeholder')
2438
2439
  }, placeholder)), /*#__PURE__*/React.createElement("div", {
2439
2440
  className: classnames(style$3['select-input-icon'], 'select-input-icon')
2440
- }, !disabled && allowClear && hover && (value || []).length > 0 ? /*#__PURE__*/React.createElement(CloseCircleFilled, {
2441
+ }, !disabled && allowClear && hover && value.length > 0 ? /*#__PURE__*/React.createElement(CloseCircleFilled, {
2441
2442
  onClick: e => {
2442
2443
  e.stopPropagation();
2443
2444
  setValue([]);
@@ -2445,7 +2446,7 @@ const SelectInput = p => {
2445
2446
  }) : /*#__PURE__*/React.createElement(DownOutlined, null)));
2446
2447
  const contextProps = {
2447
2448
  props,
2448
- value,
2449
+ value: value,
2449
2450
  setValue,
2450
2451
  searchText,
2451
2452
  setSearchText,