table: Make set_selected_row, set_selected_col public (#455)
Co-authored-by: Jason Lee <huacnlee@gmail.com>
This commit is contained in:
parent
97c01c75e8
commit
dd1b767b8a
1 changed files with 4 additions and 2 deletions
|
|
@ -361,7 +361,8 @@ where
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_selected_row(&mut self, row_ix: usize, cx: &mut ViewContext<Self>) {
|
/// Sets the selected row to the given index.
|
||||||
|
pub fn set_selected_row(&mut self, row_ix: usize, cx: &mut ViewContext<Self>) {
|
||||||
self.selection_state = SelectionState::Row;
|
self.selection_state = SelectionState::Row;
|
||||||
self.right_clicked_row = None;
|
self.right_clicked_row = None;
|
||||||
self.selected_row = Some(row_ix);
|
self.selected_row = Some(row_ix);
|
||||||
|
|
@ -373,7 +374,8 @@ where
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_selected_col(&mut self, col_ix: usize, cx: &mut ViewContext<Self>) {
|
/// Sets the selected col to the given index.
|
||||||
|
pub fn set_selected_col(&mut self, col_ix: usize, cx: &mut ViewContext<Self>) {
|
||||||
self.selection_state = SelectionState::Column;
|
self.selection_state = SelectionState::Column;
|
||||||
self.selected_col = Some(col_ix);
|
self.selected_col = Some(col_ix);
|
||||||
if let Some(_col_ix) = self.selected_col {
|
if let Some(_col_ix) = self.selected_col {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue