Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a easy way to get dojo/dijit toolkit working with knockout observables?

If I have a declared select

<select id="sel1" dojoType="dijit.form.Select" >...

And I add my knockout data binding

<select id="sel1" dojoType="dijit.form.Select" data-bind=".....">...

If the knockout array/bind is initialised prior to the dojo.ready they the select box is populated with the correct values, however because dojo re-writes the templates we lose our observables.

I'd rather not migrate to dojo observables but this seems like I'd have to in this case.

I am continuing to investigate but it looks like we'll need to make this move.

like image 427
JTew Avatar asked Nov 26 '25 15:11

JTew


1 Answers

Edit: This is not the answer, although it is a starting point.


It looks like there is knockout dojo connector.

https://github.com/imankulov/knockout-dojo-connector/blob/master/sample.html


But no samples for observablearrays and binding with selects.

like image 94
JTew Avatar answered Nov 29 '25 10:11

JTew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!