-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[core] Remove use of getState #2300
Conversation
@m2mathew do you remember exactly what was the purpose of |
We had a getState(subpart: string) API at some point 🤷♂️, happy with whatever direction we take here. |
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.
We already removed in #2141 the ability to return a subset of the state because it was never used. I'm OK with removing this method or making it private.
@@ -8,8 +8,7 @@ export interface GridStateApi { | |||
state: GridState; | |||
/** | |||
* Returns the state of the grid. | |||
* @param {string} stateId The part of the state to be returned. | |||
* @returns {any} The state of the grid. | |||
* @returns {GridState} The state of the grid. |
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.
Should we not document it for now?
* @returns {GridState} The state of the grid. | |
* @returns {GridState} The state of the grid. | |
* @ignore - do not document. |
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.
If we stop using it internally, we can just remove it.
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.
@flaviendelangle Removing the method would be a breaking change. We can move more iteratively.
I've resolved the conflicts, removed a few remaining |
@m4theushw Thanks |
A follow-up on #2208 (comment). I don't get why we even have such
getState
method. For #820, I think that we could restructure the state, and maybe havegetState
returns a subset of the state that is public.