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

TreeSelect: Selected tags not showing up when used in dropdown menu #5625

Closed
cjwang18 opened this issue Jul 28, 2020 · 1 comment
Closed

Comments

@cjwang18
Copy link

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-ivy-mmkvdd

Steps to reproduce

  1. Click "Filter Users" to open up the dropdown menu
  2. Click the tree select and select any person, e.g., "Person A"
  3. Click outside to close the tree select dropdown. At this point, the selected tag is accurate (should show "Person A")
  4. Click outside to close the dropdown menu
  5. Click "Filter Users" to open up the dropdown menu again
  6. Observe that the selected tag is not shown. However, if you inspect elements, the corresponding nz-select-item exists in the DOM.
  7. Repeat steps 2-6 with
    a. unselecting the user you selected above leads to console error
    b. selecting a user on the same team leads to same error as above
    c. selecting a user on a different team leads to the issue stacking

What is expected?

When showing the NzTreeSelect within a dropdown menu, the selected tags should persist and show correctly given an initial FormControl value.

What is actually happening?

When there is an initial FormControl value, the NzTreeSelect doesn't render the selected tags properly on subsequent shows of the NzTreeSelect.

After Step 6
The NzTreeSelect dropdown is open to show that the nodes correspond correctly to the FormControl.
image

After Step 7c
Notice the gap where the "Person A" tag would be.
image

The console error mentioned above is:

ERROR TypeError: Cannot read property 'zoomMotion' of undefined
    at eval (transition_animation_engine.ts:383)
    at Array.forEach (<anonymous>)
    at AnimationTransitionNamespace.prepareLeaveAnimationListeners (transition_animation_engine.ts:375)
    at AnimationTransitionNamespace.removeNode (transition_animation_engine.ts:440)
    at TransitionAnimationEngine.removeNode (transition_animation_engine.ts:740)
    at InjectableAnimationEngine.AnimationEngine.onRemove (animation_engine_next.ts:70)
    at AnimationRenderer.BaseAnimationRenderer.removeChild (animation_renderer.ts:175)
    at DebugRenderer2.removeChild (services.ts:772)
    at execRenderNodeAction (util.ts:369)
    at visitRenderNode (util.ts:334)

It seems like references to previous nz-select-items are lost.

Environment Info
ng-zorro-antd 9.3.0
Browser Google Chrome 84.0.4147.89 (Official Build) (64-bit)
@cjwang18 cjwang18 changed the title NzTreeSelect: Selected tags not showing up when used in dropdown menu TreeSelect: Selected tags not showing up when used in dropdown menu Jul 28, 2020
@vthinkxie
Copy link
Member

Duplicate of #1455
blocked by angular/angular#24041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants