keymap_ui: Add context menu for table rows (#33747)
Closes #ISSUE Adds a right click context menu to table rows, refactoring the table API to support more general row rendering in the process, and creating actions for the couple of operations available in the context menu. Additionally includes an only partially related change to the context menu API, which makes it easier to have actions that are disabled based on a boolean value. Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -902,7 +902,7 @@ impl Render for PanelButtons {
|
||||
})
|
||||
.anchor(menu_anchor)
|
||||
.attach(menu_attach)
|
||||
.trigger(move |is_active| {
|
||||
.trigger(move |is_active, _window, _cx| {
|
||||
IconButton::new(name, icon)
|
||||
.icon_size(IconSize::Small)
|
||||
.toggle_state(is_active_button)
|
||||
|
||||
@@ -2521,7 +2521,7 @@ impl Pane {
|
||||
let pane = cx.entity().downgrade();
|
||||
let menu_context = item.item_focus_handle(cx);
|
||||
right_click_menu(ix)
|
||||
.trigger(|_| tab)
|
||||
.trigger(|_, _, _| tab)
|
||||
.menu(move |window, cx| {
|
||||
let pane = pane.clone();
|
||||
let menu_context = menu_context.clone();
|
||||
|
||||
Reference in New Issue
Block a user