fix: align table defaults and preserve sidebar svg colors

This commit is contained in:
IanShaw027
2026-04-10 18:27:53 +08:00
parent 7dc7ff22d2
commit f480e57344
10 changed files with 40 additions and 17 deletions

View File

@@ -64,11 +64,11 @@ describe('tablePreferences', () => {
expect(normalizeTablePageSize(undefined)).toBe(20)
})
it('keeps built-in selectable defaults at 10, 20, 50', () => {
it('keeps built-in selectable defaults at 10, 20, 50, 100', () => {
window.__APP_CONFIG__ = {
table_default_page_size: 1000
} as any
expect(getConfiguredTablePageSizeOptions()).toEqual([10, 20, 50])
expect(getConfiguredTablePageSizeOptions()).toEqual([10, 20, 50, 100])
})
})

View File

@@ -2,7 +2,7 @@ const MIN_TABLE_PAGE_SIZE = 5
const MAX_TABLE_PAGE_SIZE = 1000
export const DEFAULT_TABLE_PAGE_SIZE = 20
export const DEFAULT_TABLE_PAGE_SIZE_OPTIONS = [10, 20, 50]
export const DEFAULT_TABLE_PAGE_SIZE_OPTIONS = [10, 20, 50, 100]
const sanitizePageSize = (value: unknown): number | null => {
const size = Number(value)