odaptos_design_system 2.0.94 → 2.0.95

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.
@@ -11462,7 +11462,7 @@ const ChatMessage = ({
11462
11462
  }
11463
11463
  };
11464
11464
 
11465
- var css_248z$d = ".Checkbox-module_checkboxContainer__5qvEv{align-items:center;display:flex;gap:.5rem}.Checkbox-module_disabled__DTVNo{opacity:.5}";
11465
+ var css_248z$d = ".Checkbox-module_checkboxContainer__5qvEv{align-items:center;cursor:pointer;display:flex;gap:.5rem}.Checkbox-module_disabled__DTVNo{opacity:.5}";
11466
11466
  var styles$d = {"checkboxContainer":"Checkbox-module_checkboxContainer__5qvEv","disabled":"Checkbox-module_disabled__DTVNo"};
11467
11467
  styleInject(css_248z$d);
11468
11468
 
@@ -14091,7 +14091,10 @@ const MultiSelectWithoutFilter = ({
14091
14091
  setSearchTerm,
14092
14092
  ...props
14093
14093
  }) => {
14094
- const [selectedOptions, setSelectedOptions] = React.useState([]);
14094
+ const [value, setValue] = React.useState(defaultValue === undefined ? [] : defaultValue);
14095
+ React.useEffect(() => {
14096
+ setValue(defaultValue === undefined ? [] : defaultValue);
14097
+ }, [defaultValue]);
14095
14098
  React.useEffect(() => {
14096
14099
  // Call API only if searchTerm and fetchOptions are defined
14097
14100
  if (searchTerm.length >= 3 && fetchOptions) {
@@ -14113,12 +14116,19 @@ const MultiSelectWithoutFilter = ({
14113
14116
  }), /*#__PURE__*/React__default.createElement(material.Autocomplete, Object.assign({
14114
14117
  id: inputId,
14115
14118
  multiple: true,
14116
- options: options,
14119
+ options: options ? options : [{
14120
+ label: 'Loading...',
14121
+ value: 0,
14122
+ year: 100
14123
+ }],
14117
14124
  getOptionLabel: option => {
14118
14125
  return option.label;
14119
14126
  },
14120
- value: selectedOptions,
14121
- onChange: (_event, newValue) => setSelectedOptions(newValue),
14127
+ value: value,
14128
+ onChange: (_event, newValue) => {
14129
+ setValue(newValue);
14130
+ onChange(newValue);
14131
+ },
14122
14132
  filterOptions: x => x,
14123
14133
  onInputChange: (_event, value) => setSearchTerm(value),
14124
14134
  loading: isLoading,