feat(MAJOR): removed the need for dyn_id
This is a very very very big update for UX! Ewwii finally has support for automatically assigning `dyn_id`. This was actually not as hard as I thought! I just had to mutate the widget AST and inject a `dyn_id` in based on its parent. It works soooo well and the burden on the user just reduced sooo much!
This commit is contained in:
@@ -27,9 +27,8 @@ fn animalButton(emoji, selected) {
|
||||
class: class,
|
||||
cursor: "pointer",
|
||||
onclick: "echo " + emoji + " >> /tmp/selected_emoji.txt",
|
||||
dyn_id: "dyn_eventbox_" + emoji, // unique per emoji
|
||||
}, [
|
||||
label(#{ text: emoji, dyn_id: "dyn_label_" + emoji }) // unique per emoji
|
||||
label(#{ text: emoji }) // unique per emoji
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user