fix: select panel no default value

This commit is contained in:
jialin
2026-05-18 15:37:46 +08:00
committed by jialin
parent 288bfebc13
commit db7a8a702d
2 changed files with 6 additions and 3 deletions
@@ -136,9 +136,11 @@ const AllowModelsForm: React.FC<{
id: 'apikeys.models.noModelsFound'
})}
onChange={(selectedKeys) => {
form.setFieldsValue({ allowed_model_names: selectedKeys });
form.setFieldsValue({
allowed_model_names: selectedKeys || []
});
onValuesChange?.(
{ allowed_model_names: selectedKeys },
{ allowed_model_names: selectedKeys || [] },
form.getFieldsValue()
);
}}
@@ -279,7 +279,8 @@ const AddModal: React.FC<AddModalProps> = ({
preserve={false}
initialValues={{
allowed_type: 'all',
scope: ['inference']
scope: ['inference'],
allowed_model_names: []
}}
>
{!showKey && (