@sia.soul/sia-react-ui 0.1.143 → 0.1.144
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.cjs +8 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -16897,9 +16897,15 @@ function ColumnSettingPanel({
|
|
|
16897
16897
|
const listRef = (0, import_react64.useRef)(null);
|
|
16898
16898
|
const cancelDrag = (0, import_react64.useRef)(null);
|
|
16899
16899
|
const [preview, setPreview] = (0, import_react64.useState)(null);
|
|
16900
|
+
const syncedDraft = (0, import_react64.useRef)({ open: false, signature: "" });
|
|
16900
16901
|
(0, import_react64.useEffect)(() => {
|
|
16901
|
-
|
|
16902
|
-
|
|
16902
|
+
const signature = JSON.stringify(items);
|
|
16903
|
+
const changed = signature !== syncedDraft.current.signature;
|
|
16904
|
+
if (open !== syncedDraft.current.open || changed) cancelDrag.current?.();
|
|
16905
|
+
if (open && (!syncedDraft.current.open || changed)) {
|
|
16906
|
+
setDraft(orderColumnSettings(items));
|
|
16907
|
+
}
|
|
16908
|
+
syncedDraft.current = { open, signature };
|
|
16903
16909
|
}, [items, open]);
|
|
16904
16910
|
(0, import_react64.useEffect)(() => () => cancelDrag.current?.(), []);
|
|
16905
16911
|
const labels = new Map(
|
package/dist/index.d.cts
CHANGED
|
@@ -2988,7 +2988,7 @@ interface TableColumnSettingApi {
|
|
|
2988
2988
|
/** 应用传入的配置;是否持久化由方法参数或插件选项控制。 */
|
|
2989
2989
|
apply: (settings: readonly TableColumnSettingItem[]) => void;
|
|
2990
2990
|
}
|
|
2991
|
-
/** 创建表格列设置和持久化插件。将返回值加入 Table 的 plugins
|
|
2991
|
+
/** 创建表格列设置和持久化插件。将返回值加入 Table 的 plugins 后生效;序号和勾选附加列不显示在设置中,不参与业务列排序、显隐、固定位置与宽度配置,旧存储中的附加列配置会被忽略。动态分组展开时自动补齐新叶子列,收起时保留子列设置供再次展开恢复。面板草稿在父级重渲染、聚焦、滚动或尺寸变化时保留;重新打开或外部配置实际变化时同步保存值。 */
|
|
2992
2992
|
declare function createColumnSettingPlugin<T extends Record<string, unknown>>(options?: TableColumnSettingPluginOptions<T>): TablePlugin<T, ColumnSettingState, TableColumnSettingApi>;
|
|
2993
2993
|
/** 创建使用 localStorage 持久化表格设置的适配器,按模块及业务标识隔离配置。 */
|
|
2994
2994
|
declare function createLocalStorageTableSettingsAdapter(prefix?: string): TableSettingsAdapter;
|
package/dist/index.d.ts
CHANGED
|
@@ -2988,7 +2988,7 @@ interface TableColumnSettingApi {
|
|
|
2988
2988
|
/** 应用传入的配置;是否持久化由方法参数或插件选项控制。 */
|
|
2989
2989
|
apply: (settings: readonly TableColumnSettingItem[]) => void;
|
|
2990
2990
|
}
|
|
2991
|
-
/** 创建表格列设置和持久化插件。将返回值加入 Table 的 plugins
|
|
2991
|
+
/** 创建表格列设置和持久化插件。将返回值加入 Table 的 plugins 后生效;序号和勾选附加列不显示在设置中,不参与业务列排序、显隐、固定位置与宽度配置,旧存储中的附加列配置会被忽略。动态分组展开时自动补齐新叶子列,收起时保留子列设置供再次展开恢复。面板草稿在父级重渲染、聚焦、滚动或尺寸变化时保留;重新打开或外部配置实际变化时同步保存值。 */
|
|
2992
2992
|
declare function createColumnSettingPlugin<T extends Record<string, unknown>>(options?: TableColumnSettingPluginOptions<T>): TablePlugin<T, ColumnSettingState, TableColumnSettingApi>;
|
|
2993
2993
|
/** 创建使用 localStorage 持久化表格设置的适配器,按模块及业务标识隔离配置。 */
|
|
2994
2994
|
declare function createLocalStorageTableSettingsAdapter(prefix?: string): TableSettingsAdapter;
|
package/dist/index.js
CHANGED
|
@@ -7968,9 +7968,15 @@ function ColumnSettingPanel({
|
|
|
7968
7968
|
const listRef = useRef21(null);
|
|
7969
7969
|
const cancelDrag = useRef21(null);
|
|
7970
7970
|
const [preview, setPreview] = useState22(null);
|
|
7971
|
+
const syncedDraft = useRef21({ open: false, signature: "" });
|
|
7971
7972
|
useEffect14(() => {
|
|
7972
|
-
|
|
7973
|
-
|
|
7973
|
+
const signature = JSON.stringify(items);
|
|
7974
|
+
const changed = signature !== syncedDraft.current.signature;
|
|
7975
|
+
if (open !== syncedDraft.current.open || changed) cancelDrag.current?.();
|
|
7976
|
+
if (open && (!syncedDraft.current.open || changed)) {
|
|
7977
|
+
setDraft(orderColumnSettings(items));
|
|
7978
|
+
}
|
|
7979
|
+
syncedDraft.current = { open, signature };
|
|
7974
7980
|
}, [items, open]);
|
|
7975
7981
|
useEffect14(() => () => cancelDrag.current?.(), []);
|
|
7976
7982
|
const labels = new Map(
|