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

bug(platform): list items are not updating #8629

Closed
N1XUS opened this issue Sep 1, 2022 · 0 comments · Fixed by #8650
Closed

bug(platform): list items are not updating #8629

N1XUS opened this issue Sep 1, 2022 · 0 comments · Fixed by #8650
Assignees
Labels
bug Something isn't working documentation There is an issue with documentation platform platform stackblitz

Comments

@N1XUS
Copy link
Contributor

N1XUS commented Sep 1, 2022

Is this a bug, enhancement, or feature request?

bug

Briefly describe your proposal.

Platfrom list items are not updated after initial value has been set. The issue is that items are being populated only on ngOnInit event.
Additionally, stackblitz examples for platform list are not working

Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)

current

If this is a bug, please provide steps for reproducing it.

Use this data provider:

export class ListDataProvider extends DataProvider<Address> {
    i = 0;
    items = new BehaviorSubject<Address[]>([]);
    constructor() {
        super();
    }
    fetch(params: Map<string, string>): Observable<Address[]> {
        let data = LIST_ELEMENTS;
        const name = params.get('name');
        if (name) {
            const keyword = name.toLowerCase();
            data = data.filter((city) => city.name.toLowerCase().indexOf(keyword) > -1);
        }
        setTimeout(() => {
            this.items.next(data);
        }, 500);
        return this.items.asObservable();
    }
}

Please provide relevant source code if applicable.

Is there anything else we should know?

@N1XUS N1XUS added bug Something isn't working documentation There is an issue with documentation platform platform stackblitz labels Sep 1, 2022
@N1XUS N1XUS self-assigned this Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation There is an issue with documentation platform platform stackblitz
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant