简体   繁体   English

Reactivesearch、Datasearch 组件:有没有办法扩展 SearchIconClick 上的组件?

[英]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.我想通过对单击搜索图标的事件做出反应的函数来扩展 Datasearch 组件。 In https://github.com/appbaseio/reactivesearch/pull/747/files there is a handler for this, called handleSearchIconClick.https://github.com/appbaseio/reactivesearch/pull/747/files 中有一个处理程序,称为 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!提前致谢!

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 https://codesandbox.io/s/datasearch-igd89

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM