@esvndev/es-react-config-setting 1.0.85 → 1.0.87
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 +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17134,6 +17134,8 @@ const SettingApp = (props) => {
|
|
|
17134
17134
|
return { innerWidth, innerHeight };
|
|
17135
17135
|
};
|
|
17136
17136
|
const [windowSize, setWindowSize] = React.useState(getWindowSize());
|
|
17137
|
+
//Lưu dữ liệu tab đã chọn
|
|
17138
|
+
const dataTabSelected = React.useRef({});
|
|
17137
17139
|
//Cho phép tự đóng hoặc không
|
|
17138
17140
|
const [backdrop, setBackdrop] = React.useState(true);
|
|
17139
17141
|
//Sự kiện đóng/mở cài đặt
|
|
@@ -17206,6 +17208,7 @@ const SettingApp = (props) => {
|
|
|
17206
17208
|
}, [settingData]);
|
|
17207
17209
|
//Sự kiện chọn nhóm cài đặt
|
|
17208
17210
|
const switchSettingTab = (data) => {
|
|
17211
|
+
dataTabSelected.current = data;
|
|
17209
17212
|
const updated = dataSettingGroup.map((item) => ({
|
|
17210
17213
|
...item,
|
|
17211
17214
|
active: item.id === data.id
|
|
@@ -17265,7 +17268,7 @@ const SettingApp = (props) => {
|
|
|
17265
17268
|
switch (data.type) {
|
|
17266
17269
|
case "switch":
|
|
17267
17270
|
case "checkbox":
|
|
17268
|
-
return (jsxRuntime.jsx("div", { className: "checkbox", title: data.description, children: jsxRuntime.jsx(Input$1, { style: { width: '237px !important' }, type: "checkbox", checked: (value === "true"), onChange: (e) => change_save(root, data, e) }) }, data.id));
|
|
17271
|
+
return (jsxRuntime.jsx("div", { className: "checkbox", title: data.description, children: jsxRuntime.jsx(Input$1, { style: { width: '237px !important' }, type: "checkbox", checked: (value === "true" || value === true), onChange: (e) => change_save(root, data, e) }) }, data.id));
|
|
17269
17272
|
case "radio":
|
|
17270
17273
|
return (jsxRuntime.jsx("div", { className: "radio-group", title: data.description, children: data.option?.map((opt, index) => (jsxRuntime.jsxs("label", { children: [jsxRuntime.jsx(Input$1, { type: "radio", name: data.name, value: opt.value, checked: value === opt.value, onChange: (e) => change_save(root, data, e) }), opt.name] }, index))) }, data.id));
|
|
17271
17274
|
case "combobox":
|