feat(ui): show search on AccessSelect

This commit is contained in:
Fu Diwei 2025-05-13 00:33:48 +08:00
parent 0c42bb845d
commit 7d57c5abc0
4 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,12 @@ const AccessSelect = ({ filter, ...props }: AccessTypeSelectProps) => {
return (
<Select
{...props}
filterOption={(inputValue, option) => {
if (!option) return false;
const value = inputValue.toLowerCase();
return option.label.toLowerCase().includes(value);
}}
labelRender={({ label, value }) => {
if (label) {
return renderOption(value as string);

View File

@ -391,6 +391,7 @@ const ApplyNodeConfigForm = forwardRef<ApplyNodeConfigFormInstance, ApplyNodeCon
return !!provider?.usages?.includes(ACCESS_USAGES.DNS);
}}
placeholder={t("workflow_node.apply.form.provider_access.placeholder")}
showSearch
onChange={handleProviderAccessSelect}
/>
</Form.Item>
@ -472,6 +473,7 @@ const ApplyNodeConfigForm = forwardRef<ApplyNodeConfigFormInstance, ApplyNodeCon
return !!provider?.usages?.includes(ACCESS_USAGES.CA);
}}
placeholder={t("workflow_node.apply.form.ca_provider_access.placeholder")}
showSearch
/>
</Form.Item>
</Form.Item>

View File

@ -448,6 +448,7 @@ const DeployNodeConfigForm = forwardRef<DeployNodeConfigFormInstance, DeployNode
return !!provider?.usages?.includes(ACCESS_USAGES.HOSTING);
}}
placeholder={t("workflow_node.deploy.form.provider_access.placeholder")}
showSearch
/>
</Form.Item>
</Form.Item>

View File

@ -260,6 +260,7 @@ const NotifyNodeConfigForm = forwardRef<NotifyNodeConfigFormInstance, NotifyNode
return !!provider?.usages?.includes(ACCESS_USAGES.NOTIFICATION);
}}
placeholder={t("workflow_node.notify.form.provider_access.placeholder")}
showSearch
onChange={handleProviderAccessSelect}
/>
</Form.Item>