chore: models filter by category

This commit is contained in:
jialin
2025-01-03 20:51:22 +08:00
parent 1d66becff5
commit cc45ec85fd
6 changed files with 49 additions and 16 deletions
+4 -2
View File
@@ -50,6 +50,8 @@ const Catalog: React.FC = () => {
source: modelSourceMap.huggingface_value
});
const categoryOptions = [...modelCategories.filter((item) => item.value)];
const fetchData = useCallback(async () => {
setDataSource((pre) => {
pre.loading = true;
@@ -190,13 +192,13 @@ const Catalog: React.FC = () => {
></Input>
<Select
allowClear
placeholder="Filter by category"
placeholder={intl.formatMessage({ id: 'models.filter.category' })}
style={{ width: 240 }}
size="large"
mode="multiple"
maxTagCount={1}
onChange={handleCategoryChange}
options={modelCategories.filter((item) => item.value)}
options={categoryOptions}
></Select>
<Button
type="text"