Skip to content

Commit

Permalink
[INLONG-10226][Dashboard] Fix audit item search failure (#10227)
Browse files Browse the repository at this point in the history
  • Loading branch information
haifxu committed May 16, 2024
1 parent a81d7cf commit 54f831a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions inlong-dashboard/src/ui/pages/GroupDetail/Audit/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,9 @@ export const getFormContent = (inlongGroupId, initialValues, onSearch, onDataStr
dropdownMatchSelectWidth: false,
options: {
requestAuto: true,
requestTrigger: ['onOpen', 'onSearch'],
requestService: async keyword => {
const res = await request('/audit/getAuditBases');
return keyword === undefined ? res : res.filter(audit => audit.name.includes(keyword));
requestTrigger: ['onOpen'],
requestService: () => {
return request('/audit/getAuditBases');
},
requestParams: {
formatResult: result =>
Expand All @@ -231,6 +230,7 @@ export const getFormContent = (inlongGroupId, initialValues, onSearch, onDataStr
})) || [],
},
},
filterOption: (keyword, option) => option.label.includes(keyword),
},
},
{
Expand Down
16 changes: 8 additions & 8 deletions inlong-dashboard/src/ui/pages/ModuleAudit/IdModule/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@ export const getFormContent = (initialValues, onSearch) => [
dropdownMatchSelectWidth: false,
options: {
requestAuto: true,
requestTrigger: ['onOpen', 'onSearch'],
requestService: async keyword => {
const res = await request('/audit/getAuditBases');
return keyword === undefined ? res : res.filter(audit => audit.name.includes(keyword));
requestTrigger: ['onOpen'],
requestService: () => {
return request('/audit/getAuditBases');
},
requestParams: {
formatResult: result =>
Expand All @@ -153,6 +152,7 @@ export const getFormContent = (initialValues, onSearch) => [
})) || [],
},
},
filterOption: (keyword, option) => option.label.includes(keyword),
},
},
{
Expand All @@ -165,10 +165,9 @@ export const getFormContent = (initialValues, onSearch) => [
dropdownMatchSelectWidth: false,
options: {
requestAuto: true,
requestTrigger: ['onOpen', 'onSearch'],
requestService: async keyword => {
const res = await request('/audit/getAuditBases');
return keyword === undefined ? res : res.filter(audit => audit.name.includes(keyword));
requestTrigger: ['onOpen'],
requestService: () => {
return request('/audit/getAuditBases');
},
requestParams: {
formatResult: result =>
Expand All @@ -178,6 +177,7 @@ export const getFormContent = (initialValues, onSearch) => [
})) || [],
},
},
filterOption: (keyword, option) => option.label.includes(keyword),
},
},
{
Expand Down
16 changes: 8 additions & 8 deletions inlong-dashboard/src/ui/pages/ModuleAudit/IpModule/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,9 @@ export const getFormContent = (initialValues, onSearch) => [
dropdownMatchSelectWidth: false,
options: {
requestAuto: true,
requestTrigger: ['onOpen', 'onSearch'],
requestService: async keyword => {
const res = await request('/audit/getAuditBases');
return keyword === undefined ? res : res.filter(audit => audit.name.includes(keyword));
requestTrigger: ['onOpen'],
requestService: () => {
return request('/audit/getAuditBases');
},
requestParams: {
formatResult: result =>
Expand All @@ -107,6 +106,7 @@ export const getFormContent = (initialValues, onSearch) => [
})) || [],
},
},
filterOption: (keyword, option) => option.label.includes(keyword),
},
},
{
Expand All @@ -119,10 +119,9 @@ export const getFormContent = (initialValues, onSearch) => [
dropdownMatchSelectWidth: false,
options: {
requestAuto: true,
requestTrigger: ['onOpen', 'onSearch'],
requestService: async keyword => {
const res = await request('/audit/getAuditBases');
return keyword === undefined ? res : res.filter(audit => audit.name.includes(keyword));
requestTrigger: ['onOpen'],
requestService: () => {
return request('/audit/getAuditBases');
},
requestParams: {
formatResult: result =>
Expand All @@ -132,6 +131,7 @@ export const getFormContent = (initialValues, onSearch) => [
})) || [],
},
},
filterOption: (keyword, option) => option.label.includes(keyword),
},
},
{
Expand Down

0 comments on commit 54f831a

Please sign in to comment.