add defaultsByInstallVersion (#4354)

This commit is contained in:
Terry Jia
2025-07-06 16:28:58 -04:00
committed by GitHub
parent 469594e5cc
commit 4cbcded820
3 changed files with 285 additions and 0 deletions

View File

@@ -35,6 +35,10 @@ export interface Setting {
export interface SettingParams extends FormItem {
id: keyof Settings
defaultValue: any | (() => any)
defaultsByInstallVersion?: Record<
`${number}.${number}.${number}`,
any | (() => any)
>
onChange?: (newValue: any, oldValue?: any) => void
// By default category is id.split('.'). However, changing id to assign
// new category has poor backward compatibility. Use this field to overwrite