The "Search:" box on the grid is auto populating with the text of the logged in user. How can I stop
The "Search:" box on the grid is auto populating with the text of the logged in user. How can I stop
wilkins
Posts: 3Questions: 1Answers: 0
The "Search:" box on the grid is auto populating with the text of the logged in user. How can I stop this from happening?
Answers
Unless you are using
stateSave
this doesn't happen by default. If usingstateSave
then usestateSaveParams
to remove the search term as shown in the example.If this doesn't help then provide more details of your environment and how the search input is being populated. A link to your page or test case replicating the issue is the best way to show this.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thank you for the answer.
I don't have a test DB online to give you a live site. I recorded my test session.
https://portal.unionlogic.net/testcase2.mp4
The username of the logged in user is automaticlly filled in if the user/pass is saved in the browser.
As I said it could be from
stateSave
. Or it could be the use of thesearch
option. It could be some custom code outside of Datatables populating the search input. Unfortunately its impossible to tell you how this is happening from a video. Can you post the relevant Javascript code? We might be able to see something obvious.Kevin
Thanks Kevin
I'm not a developer.... My developer guys just emailed that they have a fix that I need to test. Where would the https://datatables.net/reference/option/stateSave. option be in the code if it existed?
Its hard to say specifically as each environment is different. It will be found in the Datatables initialization code similar to the examples in the docs.
Kevin