cloudmr-ux 1.7.0 → 1.7.2
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 +13 -1
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1134,6 +1134,9 @@ var CMRSelectUpload = (props) => {
|
|
|
1134
1134
|
props.onSelected(props.fileSelection[fileIndex]);
|
|
1135
1135
|
setOpen(false);
|
|
1136
1136
|
};
|
|
1137
|
+
const sortedFiles = [...props.fileSelection].sort(
|
|
1138
|
+
(a, b) => a.fileName.localeCompare(b.fileName)
|
|
1139
|
+
);
|
|
1137
1140
|
const selectionDialog = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_Dialog6.default, { open, onClose: handleClose, children: [
|
|
1138
1141
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_DialogTitle6.default, { children: "Select or Upload" }),
|
|
1139
1142
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_DialogContent6.default, { sx: { width: 520 }, children: [
|
|
@@ -1142,7 +1145,16 @@ var CMRSelectUpload = (props) => {
|
|
|
1142
1145
|
import_Autocomplete.default,
|
|
1143
1146
|
{
|
|
1144
1147
|
disabled: uploading,
|
|
1145
|
-
options:
|
|
1148
|
+
options: sortedFiles,
|
|
1149
|
+
filterOptions: (options, state) => {
|
|
1150
|
+
const input = state.inputValue.toLowerCase();
|
|
1151
|
+
const filtered = options.filter(
|
|
1152
|
+
(option) => option.fileName.toLowerCase().startsWith(input)
|
|
1153
|
+
);
|
|
1154
|
+
return filtered.sort(
|
|
1155
|
+
(a, b) => a.fileName.toLowerCase().localeCompare(b.fileName.toLowerCase())
|
|
1156
|
+
);
|
|
1157
|
+
},
|
|
1146
1158
|
getOptionLabel: (option) => option.fileName,
|
|
1147
1159
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
1148
1160
|
value: fileIndex === -1 ? null : props.fileSelection[fileIndex],
|
package/dist/index.mjs
CHANGED
|
@@ -1086,6 +1086,9 @@ var CMRSelectUpload = (props) => {
|
|
|
1086
1086
|
props.onSelected(props.fileSelection[fileIndex]);
|
|
1087
1087
|
setOpen(false);
|
|
1088
1088
|
};
|
|
1089
|
+
const sortedFiles = [...props.fileSelection].sort(
|
|
1090
|
+
(a, b) => a.fileName.localeCompare(b.fileName)
|
|
1091
|
+
);
|
|
1089
1092
|
const selectionDialog = /* @__PURE__ */ jsxs12(Dialog6, { open, onClose: handleClose, children: [
|
|
1090
1093
|
/* @__PURE__ */ jsx18(DialogTitle6, { children: "Select or Upload" }),
|
|
1091
1094
|
/* @__PURE__ */ jsxs12(DialogContent6, { sx: { width: 520 }, children: [
|
|
@@ -1094,7 +1097,16 @@ var CMRSelectUpload = (props) => {
|
|
|
1094
1097
|
Autocomplete,
|
|
1095
1098
|
{
|
|
1096
1099
|
disabled: uploading,
|
|
1097
|
-
options:
|
|
1100
|
+
options: sortedFiles,
|
|
1101
|
+
filterOptions: (options, state) => {
|
|
1102
|
+
const input = state.inputValue.toLowerCase();
|
|
1103
|
+
const filtered = options.filter(
|
|
1104
|
+
(option) => option.fileName.toLowerCase().startsWith(input)
|
|
1105
|
+
);
|
|
1106
|
+
return filtered.sort(
|
|
1107
|
+
(a, b) => a.fileName.toLowerCase().localeCompare(b.fileName.toLowerCase())
|
|
1108
|
+
);
|
|
1109
|
+
},
|
|
1098
1110
|
getOptionLabel: (option) => option.fileName,
|
|
1099
1111
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
1100
1112
|
value: fileIndex === -1 ? null : props.fileSelection[fileIndex],
|