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);