refactor(usage): use SimpleSelect for the events-tab event-type filter

Match the other usage tabs' dropdown component instead of the raw antd
Select.
This commit is contained in:
jialin
2026-07-10 17:41:54 +08:00
committed by jialin
parent 03c47530bd
commit cb380d676e
+5 -2
View File
@@ -8,6 +8,7 @@
* tab (date range + "filter by user" for managers); the resource-type / * tab (date range + "filter by user" for managers); the resource-type /
* event-type selects ride in the bar's ``extra`` slot. * event-type selects ride in the bar's ``extra`` slot.
*/ */
import { SimpleSelect } from '@gpustack/core-ui';
import { useAccess, useIntl } from '@umijs/max'; import { useAccess, useIntl } from '@umijs/max';
import { useMemoizedFn } from 'ahooks'; import { useMemoizedFn } from 'ahooks';
import { Input, Select, Table, Tag } from 'antd'; import { Input, Select, Table, Tag } from 'antd';
@@ -242,16 +243,18 @@ const ResourceEvents: React.FC = () => {
options={RESOURCE_TYPE_OPTIONS} options={RESOURCE_TYPE_OPTIONS}
style={{ minWidth: 200 }} style={{ minWidth: 200 }}
/> />
<Select <SimpleSelect
mode="multiple" mode="multiple"
allowClear allowClear
showSearch
maxTagCount={'responsive'}
placeholder={intl.formatMessage({ placeholder={intl.formatMessage({
id: 'usage.events.eventType' id: 'usage.events.eventType'
})} })}
value={queryParams.eventTypes} value={queryParams.eventTypes}
onChange={(v) => fetchEvents({ eventTypes: v, page: 1 })} onChange={(v) => fetchEvents({ eventTypes: v, page: 1 })}
options={EVENT_TYPE_OPTIONS} options={EVENT_TYPE_OPTIONS}
style={{ minWidth: 240 }} style={{ width: 240 }}
/> />
</> </>
} }