Search Icon not stable

Hi,
I succeeded to substitute “search” for a icon in the search buton, but it goes back to “search” when clicking on table filter butons.

$(document).on(‘knack-scene-render.any’, function (page) {
$(’.kn-button.search’).html(‘ICON HERE’);
});

I am using icon: &#128269

That’s because the scene will only render once, invoking your code. When you click on a filter button it will render the view again, and will not invoke your code. Try using the view render handler

1 Like

Hi Kelson, tks! I succeeded to make it worked as you said.

I would have to specify each view ID with filters in my App pages, which are many, and also add the general code when the page as no filters (like I was doing). And that’s a lot (for me) for just changing a word by an icon for aestetic.

How can I just change everywhere the text in the button from “Search” to “” blank, and this way not mess with the original Knack code?

In CSS this way maybe?

.kn-button search { ??? : “”}