cloudmr-ux 1.7.5 → 1.7.6

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/index.js CHANGED
@@ -1130,8 +1130,7 @@ var CMRSelectUpload = (props) => {
1130
1130
  };
1131
1131
  const customFilter = (0, import_Autocomplete2.createFilterOptions)({
1132
1132
  matchFrom: "start",
1133
- // only match from beginning
1134
- stringify: (option) => option.fileName
1133
+ stringify: (option) => typeof option === "string" ? option : (option == null ? void 0 : option.fileName) || ""
1135
1134
  });
1136
1135
  const handleClose = () => {
1137
1136
  setOpen(false);
@@ -1150,7 +1149,7 @@ var CMRSelectUpload = (props) => {
1150
1149
  disabled: uploading,
1151
1150
  options: props.fileSelection,
1152
1151
  filterOptions: customFilter,
1153
- getOptionLabel: (option) => option.fileName,
1152
+ getOptionLabel: (option) => typeof option === "string" ? option : (option == null ? void 0 : option.fileName) || "",
1154
1153
  noOptionsText: "No files found starting with input",
1155
1154
  isOptionEqualToValue: (option, value) => option.id === value.id,
1156
1155
  onChange: (event, newValue) => {
package/dist/index.mjs CHANGED
@@ -1082,8 +1082,7 @@ var CMRSelectUpload = (props) => {
1082
1082
  };
1083
1083
  const customFilter = createFilterOptions({
1084
1084
  matchFrom: "start",
1085
- // only match from beginning
1086
- stringify: (option) => option.fileName
1085
+ stringify: (option) => typeof option === "string" ? option : (option == null ? void 0 : option.fileName) || ""
1087
1086
  });
1088
1087
  const handleClose = () => {
1089
1088
  setOpen(false);
@@ -1102,7 +1101,7 @@ var CMRSelectUpload = (props) => {
1102
1101
  disabled: uploading,
1103
1102
  options: props.fileSelection,
1104
1103
  filterOptions: customFilter,
1105
- getOptionLabel: (option) => option.fileName,
1104
+ getOptionLabel: (option) => typeof option === "string" ? option : (option == null ? void 0 : option.fileName) || "",
1106
1105
  noOptionsText: "No files found starting with input",
1107
1106
  isOptionEqualToValue: (option, value) => option.id === value.id,
1108
1107
  onChange: (event, newValue) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudmr-ux",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "author": "erosmontin@gmail.com",
5
5
  "license": "MIT",
6
6
  "repository": "erosmontin/cloudmr-ux",