Skip to content

Commit

Permalink
Add function to change hovered state of a table row
Browse files Browse the repository at this point in the history
  • Loading branch information
addiswebb committed Jul 12, 2024
1 parent 08c75d7 commit c993704
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/egui_extras/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,12 @@ impl<'a, 'b> TableRow<'a, 'b> {
self.selected = selected;
}

/// Set the hovered highlight state for cells added after a call to this function.
#[inline]
pub fn set_hovered(&mut self, hovered: bool) {
self.hovered = hovered;
}

/// Returns a union of the [`Response`]s of the cells added to the row up to this point.
///
/// You need to add at least one row to the table before calling this function.
Expand Down

0 comments on commit c993704

Please sign in to comment.