Skip to content

How does Iced know a widget is the same between renders? #1874

Closed Answered by 13r0ck
lufte asked this question in Q&A
Discussion options

You must be logged in to vote

Yep. Iced just assumes based by itterating through each widget's children recursively.

Give the text input widget an .id() and after each event created by the text input just also return a focus widget operation, that should keep the text input in focus even with layout changes
https://github.com/iced-rs/iced/blob/master/examples/todos/src/main.rs#L102

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lufte
Comment options

@hecrj
Comment options

@lufte
Comment options

Answer selected by lufte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants