Open poolpo opened 6 years ago
Hi,
can you provide a plunker that reproduces it?
I'm not sure if the topic starter still has this issue, but I am able to reproduce this issue. Updating the source data when using LocalData
doesn't update the dropdown. See this plunk and the comments on lines 40 and 43.
So the question remains: how to update local data such that the dropdown reflects this?
(My particular scenario is a pair of dropdowns, where the selection of the first dropdown determines the data set of the second dropdown).
Having the same problem, I've got a dropdown with some items. If I click on item 1, I'm passing values to searchData array. When I click on item 2, I'm also passing values to searchData.
Problem is here, that if I pass first set of data, click on input and then pass the second set of data, my input doesn't detect changes in ng2-completer dropdown. I have to push a keyboard key and then my ng2-completer dropdown shows new values.
@daanstolp , @oferh any solutions for this?
Also having the same problem like @Bloodcast69 - no identification of changes to auto refresh & display the relevant data.
@oferh - any solution or plan to address this?
@oferh We're waiting to hear something from you.
same problem here
Same issue here @daanstolp @Bloodcast69 @poolpo @Zakaria59
I'm using a local dataService. Depending on what type of profile the user has selected on my app, my completer loads different sets of data. But it won't actually update the dropdown items until the dropdown is focused and I start typing.
Any solutions? Or are there any other recommended plugins that have this functionality?
You can use Subject items Example:
`protected cities: Subject<City[]> = new Subject();
constructor( private completerService: CompleterService ) { this.dataService = this.completerService.local(this.cities, 'name', 'name'); } `
glad i searched just after wasting 20 minutes
When I change the data sources array, the dropdown doen't change its old values.
Here's an example:
After 5 secons, the dropdown options still being ["a", "b"].
Is there another way of achieving this?