When inlineSearchInput is true Then How would I know in my React Component its in Focus/User Typing? #575
Unanswered
rajkumardev97
asked this question in
Q&A
Replies: 1 comment 2 replies
-
There is no event to bubble up when user is typing something in the box. There is some maintenance that needs to happen like debouncing, building search tree etc. on each keystroke so raising external events would slow things down a bit. However, there is no userland interaction that we had in mind that would need such an event to be exposed. What's your use case? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is my code:
<React.Fragment>
<DropdownTreeSelect
data={data}
showDropdown={"always"}
inlineSearchInput={true}
texts={{
placeholder: "Choose...",
inlineSearchPlaceholder: "Search..."
}}
showPartiallySelected={true}
onChange={onChange}
className="mdl-dropdown-tree"
/>
</React.Fragment>
Expecting Output: Whenever user typing on inlineSearchInput of this library How would I know he is engaging with your inlineSearchInput If you have provided any callback function that will be helpful.
const inlineSearchInputOnChange = () => {
// Here Need to fire google event whenever user engage with inlineSearchInput in library.
};
<React.Fragment>
<DropdownTreeSelect
data={data}
showDropdown={"always"}
inlineSearchInput={true}
texts={{
placeholder: "Choose...",
inlineSearchPlaceholder: "Search..."
}}
showPartiallySelected={true}
onChange={onChange}
anyInlineSearchInputOnChange = {inlineSearchInputOnChange }
className="mdl-dropdown-tree"
/>
</React.Fragment>
Beta Was this translation helpful? Give feedback.
All reactions