handlerreactivesearch

Reactivesearch, Datasearch component: Is there a way to extend the component on SearchIconClick?


I would like to extend the Datasearch component by a function that reacts on the event that the search icon is clicked. In https://github.com/appbaseio/reactivesearch/pull/747/files there is a handler for this, called handleSearchIconClick. However, it seems that this handler can't be overwritten. Is there another way to react in a meaningful way on this event? If yes, are there examples around that help to solve this problem? Thank's in advance!


Solution

  • Yes, you can have a custom click event with custom search icon, here is a sample which demonstrates that

    https://codesandbox.io/s/datasearch-igd89