Skip to content

Commit

Permalink
Merge pull request #38 from grapp-dev/fix/node-data-on-select
Browse files Browse the repository at this point in the history
fix: pass node's data to the `on_select` callback
  • Loading branch information
mobily committed Apr 25, 2024
2 parents e7b760b + 707eba6 commit 01aa7ba
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 01aa7ba

Please sign in to comment.