@flozy/editor 10.7.9 → 10.8.1
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.
@@ -40,7 +40,8 @@ const SelectV1 = props => {
|
|
40
40
|
wrapColumn = false,
|
41
41
|
onChange,
|
42
42
|
onUpdate,
|
43
|
-
translation
|
43
|
+
translation,
|
44
|
+
disabled
|
44
45
|
} = props;
|
45
46
|
const [anchorEl, setAnchorEl] = useState(null);
|
46
47
|
const [anchorElOption, setAnchorElOption] = useState(null);
|
@@ -217,15 +218,13 @@ const SelectV1 = props => {
|
|
217
218
|
overflowX: wrapColumn ? "hidden" : "auto",
|
218
219
|
gap: 0.5,
|
219
220
|
padding: "8px",
|
220
|
-
cursor: "pointer"
|
221
|
+
cursor: disabled ? "auto" : "pointer"
|
221
222
|
},
|
222
|
-
onClick: handleOpenPopover,
|
223
|
+
onClick: disabled ? undefined : handleOpenPopover,
|
223
224
|
children: resolvedSelectedOptions?.map((option, index) => /*#__PURE__*/_jsx(Chip, {
|
224
225
|
label: option?.value,
|
225
|
-
onDelete: event =>
|
226
|
-
|
227
|
-
},
|
228
|
-
deleteIcon: /*#__PURE__*/_jsx(CloseIcon, {}),
|
226
|
+
onDelete: !disabled ? event => handleDeleteChip(event, option) : undefined,
|
227
|
+
deleteIcon: !disabled ? /*#__PURE__*/_jsx(CloseIcon, {}) : undefined,
|
229
228
|
variant: "filled",
|
230
229
|
sx: {
|
231
230
|
backgroundColor: option?.color,
|
@@ -237,7 +236,7 @@ const SelectV1 = props => {
|
|
237
236
|
}
|
238
237
|
},
|
239
238
|
"&:hover": {
|
240
|
-
opacity: 0.8
|
239
|
+
opacity: disabled ? 1 : 0.8
|
241
240
|
}
|
242
241
|
}
|
243
242
|
}, index))
|