komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more
http://ka-table.com
MIT License
788 stars 58 forks source link

[Question] How to get rid of 'x' in search #365

Closed lamalvin21 closed 11 months ago

lamalvin21 commented 11 months ago

Hi,

I am currently using this search feature for my table and when typing a little blue 'x' (see image below) appears on the right to allow for the option to clear the search. Would it be possible to remove or restyle this?

Screenshot 2023-12-20 at 22 31 25

Thanks in advance!

komarovalexander commented 11 months ago

Hello @lamalvin21 it is separate component, and it is regular html input - You can remove it of course and you can even use another one input you want, but im not sure that this is correct place to solve this question, because as you can see this input is not part of the package and it is used outside of a table. Provided Search demo just shows how you can setup searchValue to the table - and for this purpose you can use any components you want and customize them differently

lamalvin21 commented 11 months ago

Solution to this problem:

https://davidwalsh.name/remove-clear-search

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}