[core] Add sections to some of the feature hooks #3391
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Those sections aim at improving the readability of the hooks, especially the big one and to ensure that the definition order is correct (we should always define the API methods before the events or the
useFirstRender
for instance, to avoid edge-cases where an API methods is called before its definition.useGridFilter
Copy / paste
cleanFilterItem
+buildAggregatedFilterApplier
into a standalone file + JSDoc to lighten the main hookAPI METHODS
(others were already added in [core] Use pre-processors for sorting and filtering #3318)useGridColumnMenu
Copy / paste + typing
React.useCallback<GridColumnMenuApi['someMethod']>
API METHODS
/ ``EVENTS`useGridColumns
Copy / paste
API METHODS
/EVENTS
useGridPage
Copy / paste
API METHODS
/EFFECTS
/EVENTS
useGridPageSize
Copy / paste
API METHODS
/EFFECTS
/EVENTS
useGridSelection
Copy / paste + small improvement
PRE-PROCESSINGS
/API METHODS
/EVENTS
/EFFECTS
useGridRegisterPreProcessor
instead of manually registering the pre-processing