Closed vitasiku closed 8 years ago
The select picker doesn't use any properties called multipleValue
Is this a bound property?
If so then your observer probably needs to be multipleValue.@each
so that changes to the selection
(which is a collection) are captured as well. http://guides.emberjs.com/v1.10.0/object-model/computed-properties-and-aggregate-data/
Yes, `multipleValue
is bound to selection
property. However, I have been getting the following error before and after following your suggestion above Error while processing route: test-select-picker (intermediate value).observes is not a function
I am following the example here!.
Put differently, would you include an example to show how to use the selected values from a controller as part of the documentation?
Thanks
You linked to the dummy application So I'm curious are you experiencing this error in your own application or in a modified version of the dummy app (as in during tests on a fork of the project)?
This really feels like prototype extensions are disabled which is true in the ember-cli-select-picker repo because it is an addon and all addons have it turned off. However a normal application (created with ember new app-name
) by default has that turned on.
The dummy app is specific for testing and is not an example on how to use this addon. For a good example how to use it look at my sample ember app used on the main website.
Without seeing your code I can not help further other then suggesting to try the alternative form for declaring observers as outlined in the docs:
multipleValueChanged: Ember.observer('multipleValue', function(){
console.log("get the list of checked items here");
})
Closing due to atrophy. Reopen if needed.
I have followed the dummy example test-select-picker but can't seem to make it work. Here is my observer in the controller. I am not an expert in ember components and thanks in advance.