Skip to content
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

Remove _treeOrder member from TreeViewItem #287

Merged
merged 1 commit into from
Jan 21, 2023
Merged

Conversation

willeastcott
Copy link
Contributor

@willeastcott willeastcott commented Jan 21, 2023

At the moment, TreeView tags TreeViewItem instances with a number representing the depth first order of the item in the tree. This happens whenever a drag of a TreeViewItem ends. Since this member is protected, @ts-ignores are needed to silence the TypeScript compiler errors.

This PR refactors the code to no longer have to tag TreeViewItems with the order number. Instead, it creates a temporary Map of TreeViewItem to number (order).

This removes another 2 @ts-ignores and makes the TreeViewItem set of member variables that little bit cleaner. There are only 34 @ts-ignores left in the codebase.

@willeastcott willeastcott added the enhancement New feature or request label Jan 21, 2023
@willeastcott willeastcott self-assigned this Jan 21, 2023
@willeastcott willeastcott merged commit d7952c8 into main Jan 21, 2023
@willeastcott willeastcott deleted the refactor-tree-order branch January 21, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants