anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.41k stars 130 forks source link

attr `selected` is not working #376

Closed foray1010 closed 8 years ago

foray1010 commented 8 years ago

console returns to me that https://github.com/dekujs/deku/blob/1d0d3385ad6e9fe498a63b940d59ef9b826578e3/src/dom/setAttribute.js#L62 cannot get options from null I tried to print DOMElement.parentNode, it is null I guess it is because it runs before the element is mounted to the parent

anthonyshort commented 8 years ago

Ah yeah that would make sense. We should set the attribute value as well for that initial render and it should work fine. Should be a small test and fix for that.

anthonyshort commented 8 years ago

Just pushed a test and a fix for this in rc13. Let me know if this is working ok for you now.

foray1010 commented 8 years ago

It is working for me, thanks!