Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui.toggle_value(...).changed() always returns false #1572

Closed
tonogram opened this issue May 4, 2022 · 0 comments · Fixed by #1573
Closed

ui.toggle_value(...).changed() always returns false #1572

tonogram opened this issue May 4, 2022 · 0 comments · Fixed by #1573
Labels
bug Something is broken

Comments

@tonogram
Copy link
Contributor

tonogram commented May 4, 2022

Describe the bug
Calling Response::changed() on a Ui::toggle_value(...) always returns false regardless of whether or not the value has been changed.

To Reproduce

if ui.checkbox(&mut self.a, "Checkbox").changed() {
    println!("Checkbox changed!"); // Works as expected
}

if ui.toggle_value(&mut self.b, "Toggle value").changed() {
    println!("Toggle value changed!"); // Never executed
}

Expected behavior
ui.toggle_value(...).changed() should have the same behavior as ui.checkbox(...).changed().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant