@@ -174,7 +174,7 @@ export const CheckMkSelect = <Key extends RequestSpecStringKeys>(props: CheckMkS
174174 return (
175175 < InlineField labelWidth = { LABEL_WIDTH } label = { props . label } >
176176 < CheckMkAsyncSelect
177- inputId = { `input_${ props . label } ` }
177+ inputId = { `input_${ props . label ?. replace ( / / g , '_' ) } ` }
178178 label = { label }
179179 autocompleter = { autocompleter }
180180 onChange = { onChange }
@@ -376,11 +376,12 @@ export const HostTagFilter: React.FC<HostTagFilterProps> = (props) => {
376376} ;
377377
378378interface HostLabelProps extends CommonProps < RequestSpec [ 'host_labels' ] > {
379+ inputId : string ;
379380 autocompleter : ( value : string ) => Promise < Array < SelectableValue < string > > > ;
380381}
381382
382383export const HostLabelFilter : React . FC < HostLabelProps > = ( props ) => {
383- const { value, autocompleter, label, onChange } = props ;
384+ const { value, autocompleter, label, onChange, inputId } = props ;
384385
385386 const onLabelsChange = ( items : Array < SelectableValue < string > > ) => {
386387 const result : string [ ] = [ ] ;
@@ -410,6 +411,7 @@ export const HostLabelFilter: React.FC<HostLabelProps> = (props) => {
410411 onChange = { onLabelsChange }
411412 value = { toMultiSelectValue ( value ) }
412413 placeholder = "Type to trigger search"
414+ inputId = { inputId }
413415 />
414416 </ InlineField >
415417 ) ;
@@ -487,6 +489,7 @@ export const OnlyActiveChildren = (props: OnlyActiveChildrenProps): JSX.Element
487489 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
488490 onChange = { ( value ) => setActiveComponents ( ( c ) => [ ...c , value . value ! ] ) }
489491 value = { { label : 'Add Filter' } }
492+ inputId = "input_add_filter"
490493 />
491494 </ InlineField >
492495 ) }
0 commit comments