How can I use conditional Components in Trame? #506
-
I'm trying to use conditional Components in Trame. Specifially, I want to conditionally display VtkRemoteLocalView, however this doesn't support the v_if property so I figured I would just create two Components, one with and one without the VtkRemoteLocalView and then use the component :is directive to choose which one to display. But - it seems like the ":is" directive won't work in Python - likely becaise "is" is a reserved word. So when I try to add something like Thanks in advance for any guidance!!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm not sure what you mean by not supporting You can use |
Beta Was this translation helpful? Give feedback.
I'm not sure what you mean by not supporting
v_if
. Since it is a directive it is supported by every component by default.You can use
raw_attrs=[':is="active_component"'],
(see api)