Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

datasource doesn't update with new values #457

Open
Nixon-Joseph opened this issue Aug 28, 2020 · 0 comments
Open

datasource doesn't update with new values #457

Nixon-Joseph opened this issue Aug 28, 2020 · 0 comments

Comments

@Nixon-Joseph
Copy link

I have an instance where I need it to autocomplete different options depending on another input. When this value is updated, nothing changes in the completer, it always holds on to whatever list it hits first.

For instance:
<ng2-completer [datasource]="propertyOptions[trigger.Property]" [minSearchLength]="1" [openOnFocus]="true" placeholder="Enter value" [(ngModel)]="trigger.Value"></ng2-completer>

Where propertyOptions is { [key: string]: Array<string>; }:

{
    "BrandName": [
        "Stanley",
        "BITLY",
        "Lufkin"
    ],
    "Class1": [
        "CLA9",
        "CLA15",
        "INV SENC"
        ......
    ]
}

trigger.Property is in an [(ngModel)] on a select.

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

No branches or pull requests

1 participant