-
I have the following code: with html.Td(v_if="item['ispreopnormal']", classes="text-left", style="color:black;"): I wonder if there is any simpler way to write it, something like the following: html.Td("{{item['preop']}}", classes="text-left", style=("{color:'black' if item['ispreopnormal'] else color:'red')}", )) Of course, the above simpler code is not correct. Can you give any help? |
Beta Was this translation helpful? Give feedback.
Answered by
jourdain
Jun 21, 2024
Replies: 1 comment 5 replies
-
html.Td(
"{{ item.preop }}",
classes="text-left",
style=("{ color : item.ispreopnormal ? 'black' : 'red' }", ),
) |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
text in string are actual JavaScript not python. ;-)