I was able to do what I think you want as follows:
Figure 1. The desired functionality.
- Create a TextField for your search string. I’ll leave you to work out how to make this appear and disappear.
- Set the table’s
props.filter.enabled : true
. - Bind the table’s
props.filter.text
to the TextField created in 1. - Do some CSS injection on the filter box: set
props.filter.style.backgroundImage : } .tableFilter { display: none;}{
This will hide the filter panel even though it’s enabled.
I’m just starting to learn these tricks from user @victordcq who has contributed many examples on the forum.
Update
As suggested by @victordcq, a better way would be to do the code injection in a style class rather than directly in the props.style
of the component.
Figure 2. Doing it with style and class!
- Create a style.
- Expand the Background section.
- Inject the
} .tableFilter { display: none !important;}{
here. The!important
rule seems to be, um, important to force the display style to override the regular CSS. - Apply the style to
props.filter.style.classes
.