This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Description
Prerequisites
Description
When Datagrid selection is set to multi, the action menu on top gets re-rendered even when the data that came back with polling and the selected entities have not changed. This is probably happening because, for multi-row selection, a new selected items array is being generated for every polling update which is being given as input to ActionMenuComponent and this is resulting in re-rendering.
Impact
This should be fixed for 2 reasons:
- This results in a flicker on the screen which is not a good UX
- The polling happens every few seconds and re-rendering of actions every few seconds can have a performance impact
Steps to Reproduce
- Added a Stackblitz link below that shows the bug
- Open the Stackblitz
- Select any of the datagrid rows
- Notice how the screen is flickering every 2 seconds
Expected behavior:
When the datagrid actions, items and, the selected entities are not changed, the action menu should not be re-rendered
Actual behavior:
The action menu is re-rendered for a multi-selection data grid on every data poll even when the data and selected entities have not changed
Versions
- npm: '6.13.4',
- node: '12.16.1',
- macOS Big Sur 11.3.1
- Chrome Version 91.0.4472.114
Stackblitz
https://stackblitz.com/edit/angular-b7crgu?file=src/app/datagrid-link.example.component.ts