-
Notifications
You must be signed in to change notification settings - Fork 40
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
[V3] Refactor cell rendering engine #123
Comments
shlomiassaf
changed the title
Refactor cell rendering engine
[V3] Refactor cell rendering engine
Nov 2, 2020
Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To support most of the features in V3 we need to refactor the rendering engine of the cells.
Instead of having the cells rendered by the CDK table internally, the grid itself will render it inside the rows and control each cell.
In the CDK rendering a row (header, data, footer) requires a column list of string values that map to a list of templates identified with the same id.
The order of the column is based on the order of the column list of strings.
Any change to the list will redraw the entire row which might cause flickering of feature heavy rows, animation leftovers, etc...
nGrid has a dedicated column store ad column API that contains all the information about columns and rows. We don't really need the CDK to handle it for us. Since we know all of the columns we can easily react upon changes and also add/remove columns on the fly without having to trigger a complete rendering of the rows, just the columns that changed are taking action.
In addition, the column store will have to improve and support detailed notification of changes in column state such as visibility, movement, etc.. This is not complex since we will use angular's differ to compare changes and classify them (add/move/remove)
Each row will render it's own cells, containing a list of
ComponentRef<PblNgridCell>
which is ordered based on the DOM order. Upon change the row will update the order in the list as well as the order in the viewRef containing the cell.No new rendering is required when reordering.
Same for removal, just remove it from the list and from the viewRef.
The text was updated successfully, but these errors were encountered: