I am using SearchBox in my application. On click of searchbox the icon is hidden. I am looking for way to have it always. Can't find relevant property in IconProps which I can leverage
import React, { useRef } from 'react';
import { SearchBox } from '@fluentui/react/lib/SearchBox';
import { Stack, IStackTokens } from '@fluentui/react/lib/Stack';
const stackTokens: Partial<IStackTokens> = { childrenGap: 20 };
const searchBoxRef = useRef();
/* eslint-disable react/jsx-no-bind */
export const SearchBoxFullSizeExample = () => {
return (
<Stack tokens={stackTokens}>
<SearchBox placeholder="Search" onSearch={newValue => console.log('value is ' + newValue)} />
<SearchBox
placeholder="Search with no animation"
onSearch={newValue => console.log('value is ' + newValue)}
disableAnimation
iconProps={{ iconName: 'Search', hidden: false, styles: { root: { display: 'block' }, componentRef:{searchBoxRef} } }}
onClick={ () => searchBoxRef.hidden = false }
/>
</Stack>
);
};