Having a list view with API call. I want to hide a button, if the list view has any items. The button is outside the list view.
My idea to hide the button is to use a page state variable, like listHasItems.
My problem is, that i dont know where to add the logic which will set the variable listHasItems to true of false. The actions are triggered by tab or so. But this variable needs to be set after API call was done.