mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
refactor table column picker util to reset pinned/align to default values
This commit is contained in:
@@ -698,7 +698,7 @@ export const pickTableColumns = (options: {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let pinned: 'left' | 'right' | null = column.pinned;
|
let pinned: 'left' | 'right' | null = null;
|
||||||
|
|
||||||
if (pinnedLeftColumns.includes(column.value)) {
|
if (pinnedLeftColumns.includes(column.value)) {
|
||||||
pinned = 'left';
|
pinned = 'left';
|
||||||
@@ -706,7 +706,7 @@ export const pickTableColumns = (options: {
|
|||||||
pinned = 'right';
|
pinned = 'right';
|
||||||
}
|
}
|
||||||
|
|
||||||
let align: 'center' | 'end' | 'start' = column.align;
|
let align: 'center' | 'end' | 'start' = 'start';
|
||||||
|
|
||||||
if (alignCenterColumns.includes(column.value)) {
|
if (alignCenterColumns.includes(column.value)) {
|
||||||
align = 'center';
|
align = 'center';
|
||||||
|
|||||||
Reference in New Issue
Block a user