Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-11449][Dashboard] Add clear and search functions to some drop-down boxes #11450

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ export class SourceDefaultInfo implements DataWithBackend, RenderRow, RenderList
type: 'select',
hidden: true,
})
@ColumnDecorator()
@IngestionField()
@I18n('meta.Sources.File.ClusterName')
clusterTag: string;
readonly clusterTag: string;

@FieldDecorator({
type: 'input',
Expand Down
8 changes: 8 additions & 0 deletions inlong-dashboard/src/ui/pages/ConsumeDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ const Comp: React.FC = () => {
allowClear: true,
options: lastConsumerStatusList,
dropdownMatchSelectWidth: false,
showSearch: true,
filterOption: (keyword: string, option: { label: any }) => {
return (option?.label ?? '').toLowerCase().includes(keyword.toLowerCase());
},
},
},
{
Expand All @@ -146,6 +150,10 @@ const Comp: React.FC = () => {
allowClear: true,
options: consumes.filter(x => x.value),
dropdownMatchSelectWidth: false,
showSearch: true,
filterOption: (keyword: string, option: { label: any }) => {
return (option?.label ?? '').toLowerCase().includes(keyword.toLowerCase());
},
},
},
],
Expand Down
4 changes: 4 additions & 0 deletions inlong-dashboard/src/ui/pages/GroupDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ const Comp: React.FC = () => {
allowClear: true,
options: statusList,
dropdownMatchSelectWidth: false,
showSearch: true,
filterOption: (keyword: string, option: { label: any }) => {
return (option?.label ?? '').toLowerCase().includes(keyword.toLowerCase());
},
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export const getFilterFormContent = (defaultValues = {} as any) => [
allowClear: true,
options: statusList,
dropdownMatchSelectWidth: false,
showSearch: true,
filterOption: (keyword: string, option: { label: any }) => {
return (option?.label ?? '').toLowerCase().includes(keyword.toLowerCase());
},
},
},
];
4 changes: 4 additions & 0 deletions inlong-dashboard/src/ui/pages/SynchronizeDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ const Comp: React.FC = () => {
allowClear: true,
options: statusList,
dropdownMatchSelectWidth: false,
showSearch: true,
filterOption: (keyword: string, option: { label: any }) => {
return (option?.label ?? '').toLowerCase().includes(keyword.toLowerCase());
},
},
},
{
Expand Down
Loading