You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is every single time I write something in the SearchField input, it triggers a GET request that fully refreshes the page. It does not preserve the state, scroll or anything. In addition, and logically as a GET request, it changes the URL concatenating ?search=[the_search_query]. If the URL did not change, it would work as expected. But somehow, the URL change triggers a full page refresh, which is not the intended behaviour here.
How could I write a workaround for this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
Having this
FilmController
controller method (accessed using GET,/films
):And a
Datatable
React component like the following:The problem is every single time I write something in the
SearchField
input, it triggers a GET request that fully refreshes the page. It does not preserve the state, scroll or anything. In addition, and logically as a GET request, it changes the URL concatenating?search=[the_search_query]
. If the URL did not change, it would work as expected. But somehow, the URL change triggers a full page refresh, which is not the intended behaviour here.How could I write a workaround for this?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions