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

Delete virtual element #358

Merged
merged 2 commits into from
Jul 21, 2022
Merged

Delete virtual element #358

merged 2 commits into from
Jul 21, 2022

Commits on May 23, 2022

  1. delete virtual components for deleted items

    The radar has a domPool virtual element to save temporarily deleted nodes and reuse them when a new item is added. So if the item is deleted from the items list the item's node can still exist in the virtual dom so the item's component can be still updated by Ember.
    
    This behavior isn't working for computed fields on the ember models. Ember rejects the error when trying to access the computed property on the destroyed object if it hasn't been consumed before. This is possible if the items' component should render more fields after the update.
    
    To avoid re-rendering deleted items it's better to delete related components from the virtual pool. It doesn't give much impact on performance as this can happen only if the component has fewer total items than virtual items after the update and it also doesn't affect scroll rendering.
    atrusov-retailnext committed May 23, 2022
    Configuration menu
    Copy the full SHA
    ff82bb9 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2022

  1. test updating deleted elements

    Add test to check there are no updates for the deleted nodes
    atrusov-retailnext committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    39571e5 View commit details
    Browse the repository at this point in the history