jeffreythewang commented on a change in pull request #6257: Add sql lab
localStorage config
URL:
https://github.com/apache/incubator-superset/pull/6257#discussion_r230149859
##########
File path: superset/assets/src/SqlLab/App.jsx
##########
@@ -20,14 +20,27 @@ setupApp();
const appContainer = document.getElementById('app');
const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
initFeatureFlags(bootstrapData.common.feature_flags);
-const state = getInitialState(bootstrapData);
+const initialState = getInitialState(bootstrapData);
+const sqlLabPersistStateConfig = {
+ paths: ['sqlLab'],
+ config: {
+ slicer: paths => (state) => {
+ const subset = {};
+ paths.forEach((path) => {
+ delete state[path].common; // eslint-disable-line no-param-reassign
Review comment:
This is just a temporary solution for migrating over existing
`localStorage`, and eventually it will be dead code. Do you foresee this
happening for any other field currently under `sqlLab` if we decide to change
the schema?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]