Skip to content

Commit

Permalink
fix: pass node's data to the on_select callback
Browse files Browse the repository at this point in the history
  • Loading branch information
mobily committed Apr 25, 2024
1 parent e7b760b commit 707eba6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lua/nui-components/select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,7 @@ function Select:actions()
local tree = self:get_tree()
local focused_node = self:get_focused_node()

local obj = {
id = focused_node.id,
text = focused_node.text,
value = focused_node.value,
}

local obj = vim.deepcopy(focused_node)
local is_selected_fn = pred_selected_fn(focused_node)

if props.multiselect then
Expand Down

0 comments on commit 707eba6

Please sign in to comment.