question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi value component does not work well with async data

See original GitHub issue

Is 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?

async-values

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
MattL75commented, Apr 8, 2019

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?

0reactions
MattL75commented, Apr 8, 2019

Perfect! 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found