1

I have 4 number fields, and a search field above them.

My goal is to show only the searched fields, like someone type in the search field "green"...then only display NumberField2 with the label "green".

Any ideas what is the easiest way to make it work?


 <Segment>
    <EuiFieldSearch
        placeholder="Search..."
    />
    <EuiFlexGroup id="myForm">
        <EuiFlexItem grow={3}>
            <EuiFormRow class="myFormInput" label="blue">
                <EuiFieldNumber
                    className='new-budget-input'
                    step={1}
                    min={1}
                    name="NumberField1"
                    aria-label="Use aria labels when no actual label is in use"
                    onChange={(e) => handleInputChange(e)}
                />
            </EuiFormRow>
            <EuiFormRow class="myFormInput" label="green">
                <EuiFieldNumber
                    className='new-budget-input'
                    step={1}
                    min={1}
                    name="NumberField2"
                    aria-label="Use aria labels when no actual label is in use"
                    onChange={(e) => handleInputChange(e)}
                />
            </EuiFormRow>
            <EuiFormRow class="myFormInput" label="red">
                <EuiFieldNumber
                    className='new-budget-input'
                    step={1}
                    min={1}
                    name="NumberField3"
                    aria-label="Use aria labels when no actual label is in use"
                    onChange={(e) => handleInputChange(e)}
                />
            </EuiFormRow>
            <EuiFormRow class="myFormInput" label="yellow">
                <EuiFieldNumber
                    className='new-budget-input'
                    step={1}
                    min={1}
                    name="NumberField4"
                    aria-label="Use aria labels when no actual label is in use"
                    onChange={(e) => handleInputChange(e)}
                />
            </EuiFormRow>
        </EuiFlexItem>
    </EuiFlexGroup>
</Segment>
Mark Schultheiss
  • 32,614
  • 12
  • 69
  • 100
randomcode
  • 45
  • 6
  • Try to create an executable snippet using this as a guide: https://meta.stackoverflow.com/questions/338537/how-do-i-create-a-react-stack-snippet-with-jsx-support – Mark Schultheiss Sep 26 '22 at 16:00

0 Answers0