add initial state to table config

This commit is contained in:
Ruben Fiszel
2023-07-05 01:00:56 +02:00
parent 1d9be0c602
commit 04747d7183
3 changed files with 15 additions and 3 deletions

View File

@@ -152,6 +152,7 @@
...(resolvedConfig?.pagination?.selected != 'manual'
? {
initialState: {
...resolvedConfig.initialState,
pagination: {
pageSize: resolvedConfig?.pagination?.configuration?.auto?.pageSize ?? 20
}

View File

@@ -1148,6 +1148,14 @@ Hello \${ctx.username}
value: true,
onlyStatic: true,
tooltip: 'display a button to download the table as a csv file'
},
initialState: {
type: 'static',
fieldType: 'object',
value: {},
tooltip:
'any configuration that can be passed to the tanstack table component as initial state (https://tanstack.com/table/v8/docs/api/core/table#initialstate)',
onlyStatic: true
}
},
componentInput: {

View File

@@ -13,7 +13,8 @@
[Script.language.DENO]: 'TypeScript',
[Script.language.GO]: 'Go',
[Script.language.BASH]: 'Bash',
[Script.language.NATIVETS]: 'HTTP'
[Script.language.NATIVETS]: 'HTTP',
[Script.language.POSTGRESQL]: 'Postgresql'
}[language]
const baseClassByLanguage = {
@@ -21,7 +22,8 @@
[Script.language.DENO]: 'border border-blue-200 !bg-white',
[Script.language.NATIVETS]: 'border border-blue-200 !bg-white',
[Script.language.GO]: 'border border-[#80cbc4] !bg-white',
[Script.language.BASH]: 'border border-gray-400 !bg-white'
[Script.language.BASH]: 'border border-gray-400 !bg-white',
[Script.language.POSTGRESQL]: 'border border-gray-400 !bg-white'
}[language]
const colorByLanguage = {
@@ -29,7 +31,8 @@
[Script.language.DENO]: 'gray',
[Script.language.NATIVETS]: 'gray',
[Script.language.GO]: 'gray',
[Script.language.BASH]: 'gray'
[Script.language.BASH]: 'gray',
[Script.language.POSTGRESQL]: 'gray'
}[language] as BadgeColor
</script>