Skip to content

Commit

Permalink
Use id_salt on Table ScrollArea (emilk#5282)
Browse files Browse the repository at this point in the history
The salt is based on the table's `state_id`.

* Closes emilk#5281
* [x] I have followed the instructions in the PR template
  • Loading branch information
jwhear authored and hacknus committed Oct 30, 2024
1 parent a07bdab commit d79a223
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/egui_extras/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ impl<'a> Table<'a> {
let cursor_position = ui.cursor().min;

let mut scroll_area = ScrollArea::new([false, vscroll])
.id_salt(state_id.with("__scroll_area"))
.drag_to_scroll(drag_to_scroll)
.stick_to_bottom(stick_to_bottom)
.min_scrolled_height(min_scrolled_height)
Expand Down

0 comments on commit d79a223

Please sign in to comment.