Open DCSDB opened 8 years ago
Can you paste up the code that you're using?
Sure : https://jsbin.com/xinadegesa/edit?html,js,console,output
change "" to "
Cheers.
I think the transform
should actually contain the following (since it receives the updated array, and doesn't fire for each element):
transform: function (cat) {
return cat.map(_ => `<option>${_.name}</option>`);
}
But this still doesn't update, so I need to investigate a little further.
Would appreciate input on this: https://github.com/remy/bind.js/issues/23
Change this: "var valueSetters = ['SELECT', 'INPUT', 'PROGRESS', 'TEXTAREA'];" TO var valueSetters = ['OPTION', 'INPUT', 'PROGRESS', 'TEXTAREA'];
I am trying to bind the values of an array to the input values of a select, similar to how you bind "cats" to a UL in the playground. If I assign the array to a UL with the function :
dom:'#cats', transform: function (item){return "";}
and #cats is a UL, the the values are printed.
If I change #cats to a SELECT I get no love. any ideas?
Thank you