Hi, All
I doing the project, this page show all staff, i also have create pagination and find staff, all working. My situation is, when reset or clear the searching text input. When i clear the search input, the listing show all the list, so what i do now, i need to refresh page, so the paging and listing normal again.There is any solution, when i clear the textbox, the table list and pagination will reset as normal again?
Thank you
hi @wan mohd shariffuddin ,
for this point use can handle event On Change of Text Input. In the action, u assign StartIndex = 0 and call refresh aggreagate.
In input event i already have this implementation, where i can use your implementation?
You can create another client action with the same implementation as PaginationOnNavigate, using the same input parameter NewStartIndex. In this case, set its value to 0 (Hardcode), and then use this client action within the Clear button flow.
Hello @wan mohd shariffuddin,
For this case, you first need to identify which element is being used for filtering. For example, if you are using a SearchFilter local variable in your screen, this is what drives the filtering of the aggregate when you type in the search input. It is also the variable handled in the OnChange event of the search field.
One important thing to ensure is the filter condition inside the aggregate. It should look something like:
Staff.StaffFullName LIKE "%" + SearchFilter + "%"
To handle empty input, you can extend the condition like this:
Staff.StaffFullName LIKE "%" + SearchFilter + "%" OR Staff.StaffFullName = ""
This way, the filter works both when there is a value and when the input is empty.
Now, for the Clear button:
my on change implementation
my input keyword
My pagination implementation
need your help, where in can modified and improve so it can be use for reset also. Im using Rest API to retreive the data
Done, thank you for your help. I’ve clicked the reset button—the list refreshed and is now displaying correctly. However, the search box still retains the keyword. When I clear the search input, the data list appears duplicated.
Just add in the assign another field which is the Search variable and assign it with empty text like that “” or NullTextIdentifier() and try again.
it's works!!!!.. Thank you
Add Search variable here and assign it with “” or NullTextIdentifier().
im doing like this
when im searching, then click reset button, the textinput clear and also the pagination back to normal