New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie extension should not override data-search-text property value #4984
Comments
Thank you for the report. let searchText = '';
if (this.options.searchText !== '') {
searchText = this.options.searchText
} else if (searchTextCookie != '') {
searchText = searchTextCookie
}
//set the searchtext |
@UtechtDustin You should ignore the cookie value even it already exists if the table options (data-cookies-enabled) ignore it as well. |
I dont think so, because if somebody use a default value he want to filter for a default dataset. |
@UtechtDustin I don't understand your example with filters. If I don't want a cookie support for the given property (search-text in this case) why it should be the cookie used? |
Able to replicate as well with cookies. Doesn't respect the data-search-text value. Also data-filter-control as well also exhibits this issue. |
I think we can add an option like |
Looks like reverting to 1.15.5 for data filter control minimizes the issue. if that helps thanks guys |
Thanks @365dayes will compare the current and old versions. |
Example with fix: https://live.bootstrap-table.com/code/djhvscf/9692 |
When I set initial value for the input search, the result input value is always set to the empty string.
(eventhough I don't want the searchInput text cookie to be used)
Table properties:
The core of the problem resides in the cookie extension. It always passes empty string no matter other property (cookie is not defined, data-search-text is set)
I suppose that correct behavior should be something like this (pseudocode):
Used version: 1.16.0
The text was updated successfully, but these errors were encountered: