Closed MetalCar closed 2 months ago
Hi @MetalCar,
You know that by design the app provides the ui5-input component to be used for the search (i.e. sets it to the "searchField" slot of the ShellBar) So the app can already use the existing ui5-input API to add a listener for the inputs change/input events => can trigger a search when something is entered in the searchfield. Or did you mean something else?
We are using the React-Components of UI5. I already opened an issue there, but they refer me to this repository. I have a ShellBar on top of my application. The ShellBar offers a property called searchField
. I can assign an Input to this searchField, so that input will be rendered in the ShellBar, but with an additional IconButton with a magnifier on it. When i click on this magnifier icon button, then the only behaviour of this button is, to toggle that input, that i entered into the searchField
-property. In the following, my example Code of our ShellBar (but it's react)
<ShellBar
searchField={
<>
<Input
ref={searchField}
showClearIcon={true}
onKeyUp={handleChange}
/>
</>
}
>
And I also attached an image to describe what i mean.
All what I want is, to change the behavoiur of that magnifier button, but it comes automatically through the searchField
-Property.
Hi @MetalCar,
So you want the app to be notified whenever the user clicks the "magnifier" button in order to do some additional/different action, for example, prevent the hiding of the search field and instead trigger a search for the entered term?
That's exactly what I want todo!
Hello @SAP/ui5-webcomponents-topic-p, could you please take a look of this feature request to provide an event for search icon click similar to the one that the profile icon has.
Internal reference: BGSOFUIPIRIN-6076
Issue Description
Is it right, that that magnifier button only toggles the searchField? Is it possible to change this behaviour, that when something is entered in the searchfield that the search will be triggered?
https://github.com/SAP/ui5-webcomponents-react/issues/3982