acute-select
acute-select copied to clipboard
If you're using an id/name combination the model becomes the whole json object not just the model
<div class="ac-select" ac-model="itemListing.selectedVideo.productId" ac-key="id" ac-options="p.id as p.name for p in productListing.products" data-ac-settings="{ loadOnOpen: true, minWidth: '300px' }"></div>
{{ itemListing.selectedVideo.productId }}
If I set this up and trying an output itemListing.selectedVideo.productId it will return the entirety of the selectedVideo object not just the productId
I've tried using ac-key with the same result..
Yes, this is a limitation at the moment, due to the custom implementation of the ac-model and ac-options attributes. I think you'll need to use the selectedVideo object as the model and then access the productId in the js.
I'm considering changing to the standard ng-model and ng-options and making them consistent with the standard angular select, but that will take a while and would be a breaking change.