Grid does not respond to interaction
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Describe the bug**
The `Grid` does not respond to interaction. when trying to do click processing, nothing happens.
I output the entire `Response`, then the `Grid.Response` has a default state for all fields. The click fields are all set to `false` and never go to `true`.
**To Reproduce**
```rust
fn render_vault(&mut self, ctx: &egui::Context) {
egui::SidePanel::left("sub-vault").show(ctx, |ui| {
ui.label("placeholder");
});
egui::CentralPanel::default().show(ctx, |ui| {
ui.horizontal_top(|ui| {
let grid = egui::Grid::new("records")
.num_columns(5)
.striped(true)
.show(ui, |ui| {
// header
ui.label("Title");
ui.label("User name");
ui.label("Password");
ui.label("URL");
ui.label("Description");
ui.end_row();
})
.response;
if grid.clicked() {
println!("click!")
}
if grid.clicked_by(PointerButton::Secondary) {
println!("right click!")
}
})
});
}
```
Click on the grid and nothing happens, repeats for any click/drag action.
**Expected behavior**
Output to the console is expected.
**Desktop (please complete the following information):**
- OS: Ubuntu 22.04, Windows 11.
Contributor guide
Research direction
Reproduce the issue from the render_vault entry point and inspect Grid::show and the returned Response to determine whether the grid itself is expected to receive click and drag input. Compare the documented response behavior with the example, then define the fix by making the reported interaction observable and verifying that left and secondary clicks no longer remain false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100