Hi,
I am new to Power apps, and am creating a Canvas app. I have a gallery that I want to filter based on the content of a Text Input field, but only when someone clicks a button. This button is also responsible for showing a loading spinner whilst the gallery is filtered.
The button's OnSelect property is
My Gallery's Items is currently:
If(varIsLoading = false,FirstN('SalesLT.Customer', 100), Filter('SalesLT.Customer',
StartsWith(FirstName, Trim(First(Split(TextInput1.Text, " ")).Value)) &&
StartsWith(LastName, Trim(Last(Split(TextInput1.Text, " ")).Value))
))
But, I want it so that the gallery is filtered only when the button is clicked (using the same functionality in my Filter in gallery items), and that the spinner (which has a visible property of varIsLoading) appears only when the data is being obtained, and goes away when the gallery has finished loading.
Any help would be much appreciated for a newbie. Currently, the filter works itself, but it starts to filter as soon as someone types in the text input field, but I want it to be on button click to show the spinner etc.
Thanks
LM.