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
Fixes #18495: Add a reset columns button and some guard on localstorage cache #3331
Conversation
@@ -1229,12 +1230,12 @@ function createNodeTable(gridId, nope, contextPath, refresh) { | |||
var cacheId = gridId + "_columns" | |||
var cacheColumns = localStorage.getItem(cacheId) | |||
if (cacheColumns !== null) { | |||
columns = JSON.parse(cacheColumns).filter(function(c) { return c !== null}) | |||
console.log(columns) | |||
// Filter columns that are null, and columns that have a title that is not a key in of AllColumns, or if data doesnot start bien software or property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start /by/
|
||
delete params["ajax"]; | ||
|
||
dynColumns = Object.keys(allColumns).filter(function(c) { return !(defaultColumns.map(function(col) { return col.title}).includes(c))}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
marvelous how much boilerplate you need for a lambda .map(_.title)
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's terrible ...
There is a MUCH better syntax that exists but i don't know if i can use it or not (some old browser may not have it) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
( x => x.title )
PR updated with a new commit |
This PR is not mergeable to upper versions. |
OK, squash merging this PR |
4de82f7
to
6bbc5d4
Compare
https://issues.rudder.io/issues/18495