Cookie extension should not override data-search-text property value
See original GitHub issueWhen 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:
data-search-text="mySearchValue"
data-cookies-enabled="['bs.table.columns']"
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)
// this.options.searchText ... mySearchValue
// searchTextCookie is null
this.options.searchText = searchTextCookie ? searchTextCookie : '';
I suppose that correct behavior should be something like this (pseudocode):
if (cookieEnabled('bs.table.searchText') && this.options.searchText == '') {
this.options.searchText = searchTextCookie ? searchTextCookie : '';
}
Used version: 1.16.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
Swift - How can I override an extension method in a ...
Tried this with swift 2.0, seems to compile fine if you have the override but still refers to the extensions values and not...
Read more >Override protocol extension from framework
It is not possible to override functionality (like properties or methods) in extensions. This is documented in Apple's Swift book in section "Extensions"...
Read more >Allow `override` of `open` methods in & from extensions ...
I use extension a lot to clarify my code, separating the main declaration of a class/struct and its properties from the methods I...
Read more >Cookie Override – Get this Extension for Firefox (en-US)
The extension allows to add rules overriding specific cookie values whenever a website producing the cookie is visited.
Read more >Table Options - Bootstrap Table
The table options are defined in jQuery.fn.bootstrapTable.defaults . -. Attribute: data-toggle. Type: String. Detail: Activate bootstrap table without ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we can add an option like
data-cookie-override-search='true'
or something in order to define the precedenceExample with fix: https://live.bootstrap-table.com/code/djhvscf/9692