Search Field: Persisting Value: How to clear upon refresh or new session?

Search Field: Persisting Value: How to clear upon refresh or new session?

jeff00seattlejeff00seattle Posts: 3Questions: 3Answers: 0

I wish to have DataTable's search field cleared upon either pressing refresh or starting a new session.

What is happening is that upon initial mounting of DataTable, the search field is blank, then I add a value to search field and it finds results, good. However, after I logout and sign back into site, the DataTable's search field still has the last value I entered, not good.

What is the best way to resolve this?

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Sounds like you have state saving enabled. Do you (stateSave)? If you don't want state saving, I would suggest disabling it.

    Allan

  • lorikay4lorikay4 Posts: 18Questions: 4Answers: 1

    I do not have a stateSave option (indeed, don't know what that is). How does one clear the search field and make all the rows of a table visible again?

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Use search() with an empty string.

    Allan

This discussion has been closed.