HeapsIO / domkit

CSS Components based strictly typed UI framework for Haxe
MIT License
84 stars 20 forks source link

Fix elements with conditions not resetting their values on init #43

Closed Speedphoenix closed 1 year ago

Speedphoenix commented 1 year ago

This used to cause issues with code like this

static var SRC = <comp>
    <flow id="test" if(complexCondition)/>
</comp>

override function init() {
    super.init();
    initComponent();
    if (test != null) {
        // code that assumes complexCondition is true
    }
    bind(function() {
        if (!complexCondition)
            rebuild();
    });
}