@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.mjs CHANGED
@@ -17107,6 +17107,8 @@ const SettingApp = (props) => {
17107
17107
  return { innerWidth, innerHeight };
17108
17108
  };
17109
17109
  const [windowSize, setWindowSize] = useState(getWindowSize());
17110
+ //Lưu dữ liệu tab đã chọn
17111
+ const dataTabSelected = useRef({});
17110
17112
  //Cho phép tự đóng hoặc không
17111
17113
  const [backdrop, setBackdrop] = useState(true);
17112
17114
  //Sự kiện đóng/mở cài đặt
@@ -17179,6 +17181,7 @@ const SettingApp = (props) => {
17179
17181
  }, [settingData]);
17180
17182
  //Sự kiện chọn nhóm cài đặt
17181
17183
  const switchSettingTab = (data) => {
17184
+ dataTabSelected.current = data;
17182
17185
  const updated = dataSettingGroup.map((item) => ({
17183
17186
  ...item,
17184
17187
  active: item.id === data.id
@@ -17238,7 +17241,7 @@ const SettingApp = (props) => {
17238
17241
  switch (data.type) {
17239
17242
  case "switch":
17240
17243
  case "checkbox":
17241
- return (jsx("div", { className: "checkbox", title: data.description, children: jsx(Input$1, { style: { width: '237px !important' }, type: "checkbox", checked: (value === "true"), onChange: (e) => change_save(root, data, e) }) }, data.id));
17244
+ return (jsx("div", { className: "checkbox", title: data.description, children: jsx(Input$1, { style: { width: '237px !important' }, type: "checkbox", checked: (value === "true" || value === true), onChange: (e) => change_save(root, data, e) }) }, data.id));
17242
17245
  case "radio":
17243
17246
  return (jsx("div", { className: "radio-group", title: data.description, children: data.option?.map((opt, index) => (jsxs("label", { children: [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));
17244
17247
  case "combobox":