Looking for a minimal working example with reactive computed mapped array properties #6180
Unanswered
otiv-willem-vanhulle
asked this question in
Q&A
Replies: 1 comment 4 replies
-
This is something that can be done in native could. E.g. in Rust there is the MapModel than can be used to solve this problem. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the following example, I created two components: a high-level and a low-level component. A low-level component in practice may be something like a generic table widget. The high-level component in practice may be a table of some business-specific kind of items.
link to playground
I would like to be able to uncomment
red_items.map(|item| {background_color: red, text: item.text})
somehow. If this is not possible, can I do it with Rust? What would be a minimally working example? What is the idiomatic way in Slint to do this?It seems like a common use case where you have a more low-level component and want to "sub-class" it to have more business-specific functionality.
I am coming from Svelte, where they have reactive declarations.
Beta Was this translation helpful? Give feedback.
All reactions