Skip to content
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

Enable grid state, Fixes #314 #331

Merged
merged 41 commits into from
Jun 8, 2018
Merged

Enable grid state, Fixes #314 #331

merged 41 commits into from
Jun 8, 2018

Conversation

febbraiod
Copy link
Member

Opening for review, contains test/demo code that must be removed before merge (5/30/18)

colChooserButton({gridModel}),
button({text: 'GroupBy Type', onClick: () => gridModel.setGroupBy('valueType')}),
button({text: 'Clear Grouping', onClick: () => gridModel.setGroupBy(null)})
];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All code in config panel is for Demo purposes, remove before merge.

}).finally(() =>{
this._resetting = false;
});
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this method needs to be async. It is in Hoist-Sencha, but I think that maybe for a db based override to loading/reseting state. Not sure if we want to prepare for that now or keep it simpler for the moment.

//--------------------------
saveStateChange = debounce(function() {
this.saveState(this.getStateKey(), this.state);
}, 5 * SECONDS);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Hoist-Sencha we check for the state object and whether or not we are resetting. I think we should always have a state object (even if it's empty).

As far as resetting, I think if we keep the asynchronous state reset we should check for it, but if we make that operation synchronous it's probably unnecessary.

@@ -32,6 +32,12 @@ export class ColChooser extends Component {
item: leftRightChooser({model: lrModel})
}),
toolbar(
button({
text: 'Reset',
icon: Icon.refresh({cls: 'xh-red'}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note hoist-react develop branch just recently got an undo icon we should use here.

@lbwexler lbwexler merged commit 438435c into develop Jun 8, 2018
@lbwexler lbwexler deleted the gridState branch June 8, 2018 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants