Skip to content

Commit

Permalink
[DataGrid] remove needless check in useGridStateInitialization (#14181
Browse files Browse the repository at this point in the history
)

Co-authored-by: Rom Grk <[email protected]>
  • Loading branch information
k-rajat19 and romgrk authored Aug 15, 2024
1 parent bed323f commit 403d6ff
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ export const useGridStateInitialization = <PrivateApi extends GridPrivateApiComm
if (!ignoreSetState) {
// We always assign it as we mutate rows for perf reason.
apiRef.current.state = newState;

if (apiRef.current.publishEvent) {
apiRef.current.publishEvent('stateChange', newState);
}

apiRef.current.publishEvent('stateChange', newState);
apiRef.current.store.update(newState);
}

Expand Down

0 comments on commit 403d6ff

Please sign in to comment.