Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Support conditional update on panel-class #5368

Closed
rohdef opened this issue Jan 30, 2016 · 3 comments
Closed

Support conditional update on panel-class #5368

rohdef opened this issue Jan 30, 2016 · 3 comments

Comments

@rohdef
Copy link

rohdef commented Jan 30, 2016

I have a set of options that I group in the accordion, I'd like to do something like this:

thing is this works on load, but does not update when the isValid setting is changed :(

@Foxandxss
Copy link
Contributor

There is no support for that at this moment. panel-class is set once.

Not hard to do, but every watch is a performance hit on the app and we need to consider if that feature is worthwhile or not for that.

@wesleycho
Copy link
Contributor

We could support an optional @ binding. I think I would be fine with that, seems reasonable - the workaround is to do something like class="{{foo ? 'panel-danger'}}", which potentially adds likely two watchers anyway. (1 interpolation * 2, 2 for the original element and for the element replacing it)

@rohdef
Copy link
Author

rohdef commented Feb 26, 2016

@Foxandxss that makes sense, I guess for the majority of the uses cases you're quite right. The suggestion by @wesleychy seemss quite reasonable to me :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants