Multi value component does not work well with async data
See original GitHub issueIs this a bug, enhancement, or feature request?
bug
Briefly describe your proposal.
Multi value component does not work well with async data
Which versions of Angular and Fundamental NGX are affected? (If this is a feature request, use current version.)
fiori-fundamentals 1.4.5
fundamental-ngx 0.2.0
If this is a bug, please provide steps for reproducing it.
When multi values is filled with static data - works as expected.
When data comes asynchronously - it does not react properly on changes (ui reacts too fast, then doesnt pick up on new data, ending up with being one result set behind)
Please provide relevant source code if applicable.
template.html
<h1>[persons$ length]: {{ (persons$ | async)?.length }}</h1>
<fd-multi-input
[dropdownValues]="persons$ | async"
[placeholder]="'Search here...'"
[(ngModel)]="selected"
[displayFn]="displayFormatFn"
(searchTermChange)="searchTermChanged($event)"
>
</fd-multi-input>
Selected: {{ selected | json }}
persons$
observable is being notified on searchTermChange
callback (which triggers async call)
Is there anything else we should know?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How To Handle Async Data Loading, Lazy Loading, and Code ...
When a component loads, it can start an asynchronous function, and when ... Asynchronous code is not just limited to requests for new...
Read more >Angular - Observable with async pipe used multiple times in ...
Using the async pipe makes handling subscriptions much easier. It automatically handles unsubscribing unlike subscribing in the component.
Read more >Value do not get selected in async component #2233 - GitHub
Please have a look at this code, When I click on the drop down it shows 10 values, If I select any value...
Read more >How to avoid multiple async pipes in Angular | by Yury Katkov
There are two problems with that approach. First, is that it looks too artificial to create a container just to expand observable. Secondly,...
Read more >Fetching Asynchronous Data with React Hooks - Giorgio Polvara
With class-based components we do this in the componentDidMount method: import React from "react"; import { getResource } from ".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No it was just me rambling on our solution for the component. The RC build just finished 2 minutes ago - can you get on 0.4.0-rc.6 and give it a quick test?
Perfect! 😄