@etsoo/materialui 1.6.67 → 1.6.68
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/lib/cjs/SelectEx.js +2 -2
- package/lib/mjs/SelectEx.js +2 -2
- package/package.json +7 -7
- package/src/SelectEx.tsx +7 -4
package/lib/cjs/SelectEx.js
CHANGED
|
@@ -49,7 +49,7 @@ function SelectEx(props) {
|
|
|
49
49
|
};
|
|
50
50
|
// Local value
|
|
51
51
|
const v = defaultValue ?? value;
|
|
52
|
-
const valueSource = react_1.default.useMemo(() => (multiple ? (v ? (Array.isArray(v) ? v : [v]) : []) : v ?? ""), [multiple, v]);
|
|
52
|
+
const valueSource = react_1.default.useMemo(() => (multiple ? (v ? (Array.isArray(v) ? v : [v]) : []) : (v ?? "")), [multiple, v]);
|
|
53
53
|
const setOptionsAdd = react_1.default.useCallback((options) => {
|
|
54
54
|
const localOptions = [...options];
|
|
55
55
|
if (autoAddBlankItem) {
|
|
@@ -192,7 +192,7 @@ function SelectEx(props) {
|
|
|
192
192
|
}
|
|
193
193
|
}, style: itemStyle == null ? undefined : itemStyle(option), children: [multiple && ((0, jsx_runtime_1.jsx)(Checkbox_1.default, { checked: Array.isArray(valueState)
|
|
194
194
|
? valueState.includes(id)
|
|
195
|
-
: valueState === id })), (0, jsx_runtime_1.jsx)(ListItemText_1.default, { primary: label }), itemIconRenderer && ((0, jsx_runtime_1.jsx)(ListItemRightIcon_1.ListItemRightIcon, { children: itemIconRenderer(option[idField]) }))] }, id));
|
|
195
|
+
: valueState === id })), (0, jsx_runtime_1.jsx)(ListItemText_1.default, { primary: label, slotProps: { primary: { noWrap: true } } }), itemIconRenderer && ((0, jsx_runtime_1.jsx)(ListItemRightIcon_1.ListItemRightIcon, { children: itemIconRenderer(option[idField]) }))] }, id));
|
|
196
196
|
}) }), helperText != null && (0, jsx_runtime_1.jsx)(FormHelperText_1.default, { children: helperText })] }), refresh != null &&
|
|
197
197
|
loadData != null &&
|
|
198
198
|
(typeof refresh === "string" ? ((0, jsx_runtime_1.jsx)(IconButton_1.default, { size: "small", title: refresh, onClick: refreshData, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) })) : (refresh))] }));
|
package/lib/mjs/SelectEx.js
CHANGED
|
@@ -43,7 +43,7 @@ export function SelectEx(props) {
|
|
|
43
43
|
};
|
|
44
44
|
// Local value
|
|
45
45
|
const v = defaultValue ?? value;
|
|
46
|
-
const valueSource = React.useMemo(() => (multiple ? (v ? (Array.isArray(v) ? v : [v]) : []) : v ?? ""), [multiple, v]);
|
|
46
|
+
const valueSource = React.useMemo(() => (multiple ? (v ? (Array.isArray(v) ? v : [v]) : []) : (v ?? "")), [multiple, v]);
|
|
47
47
|
const setOptionsAdd = React.useCallback((options) => {
|
|
48
48
|
const localOptions = [...options];
|
|
49
49
|
if (autoAddBlankItem) {
|
|
@@ -186,7 +186,7 @@ export function SelectEx(props) {
|
|
|
186
186
|
}
|
|
187
187
|
}, style: itemStyle == null ? undefined : itemStyle(option), children: [multiple && (_jsx(Checkbox, { checked: Array.isArray(valueState)
|
|
188
188
|
? valueState.includes(id)
|
|
189
|
-
: valueState === id })), _jsx(ListItemText, { primary: label }), itemIconRenderer && (_jsx(ListItemRightIcon, { children: itemIconRenderer(option[idField]) }))] }, id));
|
|
189
|
+
: valueState === id })), _jsx(ListItemText, { primary: label, slotProps: { primary: { noWrap: true } } }), itemIconRenderer && (_jsx(ListItemRightIcon, { children: itemIconRenderer(option[idField]) }))] }, id));
|
|
190
190
|
}) }), helperText != null && _jsx(FormHelperText, { children: helperText })] }), refresh != null &&
|
|
191
191
|
loadData != null &&
|
|
192
192
|
(typeof refresh === "string" ? (_jsx(IconButton, { size: "small", title: refresh, onClick: refreshData, children: _jsx(RefreshIcon, {}) })) : (refresh))] }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.68",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
"react-dom": "$react-dom"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@babel/core": "^7.29.
|
|
69
|
-
"@babel/plugin-transform-runtime": "^7.29.
|
|
70
|
-
"@babel/preset-env": "^7.29.
|
|
71
|
-
"@babel/preset-react": "^7.
|
|
72
|
-
"@babel/preset-typescript": "^7.
|
|
73
|
-
"@babel/runtime-corejs3": "^7.29.
|
|
68
|
+
"@babel/core": "^7.29.7",
|
|
69
|
+
"@babel/plugin-transform-runtime": "^7.29.7",
|
|
70
|
+
"@babel/preset-env": "^7.29.7",
|
|
71
|
+
"@babel/preset-react": "^7.29.7",
|
|
72
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
73
|
+
"@babel/runtime-corejs3": "^7.29.7",
|
|
74
74
|
"@testing-library/jest-dom": "^6.9.1",
|
|
75
75
|
"@testing-library/react": "^16.3.2",
|
|
76
76
|
"@types/pica": "^9.0.5",
|
package/src/SelectEx.tsx
CHANGED
|
@@ -184,7 +184,7 @@ export function SelectEx<
|
|
|
184
184
|
// Local value
|
|
185
185
|
const v = defaultValue ?? value;
|
|
186
186
|
const valueSource = React.useMemo(
|
|
187
|
-
() => (multiple ? (v ? (Array.isArray(v) ? v : [v]) : []) : v ?? ""),
|
|
187
|
+
() => (multiple ? (v ? (Array.isArray(v) ? v : [v]) : []) : (v ?? "")),
|
|
188
188
|
[multiple, v]
|
|
189
189
|
);
|
|
190
190
|
|
|
@@ -326,8 +326,8 @@ export function SelectEx<
|
|
|
326
326
|
multiple
|
|
327
327
|
? valueState
|
|
328
328
|
: localOptions.some((o) => o[idField] === valueState)
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
? valueState
|
|
330
|
+
: ""
|
|
331
331
|
}
|
|
332
332
|
input={
|
|
333
333
|
<OutlinedInput
|
|
@@ -409,7 +409,10 @@ export function SelectEx<
|
|
|
409
409
|
}
|
|
410
410
|
/>
|
|
411
411
|
)}
|
|
412
|
-
<ListItemText
|
|
412
|
+
<ListItemText
|
|
413
|
+
primary={label}
|
|
414
|
+
slotProps={{ primary: { noWrap: true } }}
|
|
415
|
+
/>
|
|
413
416
|
{itemIconRenderer && (
|
|
414
417
|
<ListItemRightIcon>
|
|
415
418
|
{itemIconRenderer(option[idField])}
|