I have a seachbar and it works as it should.
But I would like to make a search with a click on different buttons also. So when I click a button then it sorts by the button data-search=“table” or something like that.
If you don’t need to use Searchbar API and your Searchbar is inside of the page and presented in DOM on moment of page initialization then it can be auto initialized with just adding additional searchbar-init class
Thus, if you do need to use the API, you need to initialise it through Javascript. Or at least, that’s the way I would comprehend that statement.