TerryZ / v-selectmenu

SelectMenu for Vuejs, A simple, easier and highly customized menu solution
https://terryz.github.io/docs-vue/#/selectmenu
MIT License
187 stars 25 forks source link

Select Menu doesn't seem to update if data modifies #17

Closed rlightner closed 4 years ago

rlightner commented 5 years ago

I'm lazying loading the contents and the drop down doesn't seem to rebind the data source.

TerryZ commented 5 years ago

Can you post your code or upload to somewhere like jsFiddle, CodePen

radarsu commented 5 years ago

Got same error. Tried using computed properties and several workarounds, but it still didn't work.

The cause of the problem is the "results" property which copies data from original "data" property (during mounted hook) and isn't reference to data. That makes setting "results" only possible with initial data.

I've created a pull request to fix the issue, although I didn't test it too much (works well in my project so far).

TerryZ commented 4 years ago

Fixed in latest version.