File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
npm-packages/dashboard-common/src/features/data/components/DataFilters Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,6 @@ export function IndexFilters({
122122 const { useLogDeploymentEvent } = useContext ( DeploymentInfoContext ) ;
123123 const log = useLogDeploymentEvent ( ) ;
124124
125- const searchIndex =
126- shownFilters . index && "search" in shownFilters . index
127- ? shownFilters . index
128- : null ;
129-
130125 const indexOptions : { value : IndexOptionValue ; label : string } [ ] = indexes
131126 ? [
132127 // Add the by_id system index
@@ -177,6 +172,16 @@ export function IndexFilters({
177172 const selectedTableIndex = indexes ?. find (
178173 ( index ) => index . name === shownFilters . index ?. name ,
179174 ) ;
175+ const searchIndex =
176+ shownFilters . index && "search" in shownFilters . index
177+ ? shownFilters . index
178+ : null ;
179+ const searchFilterField =
180+ searchIndex &&
181+ selectedTableIndex &&
182+ "searchField" in selectedTableIndex . fields
183+ ? selectedTableIndex . fields . searchField
184+ : null ;
180185
181186 return (
182187 < >
@@ -367,7 +372,7 @@ export function IndexFilters({
367372 { searchIndex && (
368373 < >
369374 < SearchValueEditor
370- field = { searchIndex . name }
375+ field = { searchFilterField ?? "unknown" }
371376 value = { searchIndex . search }
372377 onChange = { ( newValue : string ) => {
373378 const newFilters : FilterExpression = {
You can’t perform that action at this time.
0 commit comments