We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since the cdns aren't working, I'll just go directly into code here, rather than using jsfiddle.
works:
app = { controller: function(){ this.someList = m.prop([1, 2, 3, 4, 5, 6]); this.isVisible = m.prop(true); this.toggleVisible = function(){ this.isVisible(!this.isVisible()); } }, view: function(ctrl){ return m("div", [ m("button", {onclick: ctrl.toggleVisible.bind(ctrl)}, "toggle!"), m("div", [ ctrl.isVisible() ? m("div", "on") : m("div", "off"), m("div", "all the other shit") ]) ]); } } m.module(document, app);
Funky cases:
... ctrl.isVisible() ? m("div", "on") : "",
... ctrl.isVisible() ? m("div", "on") : m("span", "off"),
... ctrl.isVisible() ? m("div", "on") : m("button", {onclick: /*something*/},"off"),
When they're generated, they're appended to the bottom of the list, like the previous bugs.
As far as I've tested, conditional ordering really only works properly on divs.
The text was updated successfully, but these errors were encountered:
Thanks for the bug report! I'm trying to nail down all the edge cases where this issue is happening, so this is really useful.
Sorry, something went wrong.
The following case also breaks:
ctrl.isVisible() ? m("div", "on") : m.trust("foo")
All the cases are fixed in v0.1.8, which is now released. CDNs are not up to date yet.
No branches or pull requests
Since the cdns aren't working, I'll just go directly into code here, rather than using jsfiddle.
works:
Funky cases:
When they're generated, they're appended to the bottom of the list, like the previous bugs.
As far as I've tested, conditional ordering really only works properly on divs.
The text was updated successfully, but these errors were encountered: