Skip to content

Commit

Permalink
Merge pull request esx-framework#882 from xrtw/patch-4
Browse files Browse the repository at this point in the history
fix(esx_context/main.lua): nui callback warning
  • Loading branch information
CsokiHUN authored Feb 7, 2023
2 parents 4efeaf2 + 51f6f2c commit 86d4e91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions [core]/esx_context/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ RegisterNUICallback("closed",function(data,cb)
Closed()
end)

RegisterNUICallback("selected",function(data)
RegisterNUICallback("selected",function(data,cb)
if not activeMenu
or not activeMenu.onSelect
or not data.index
Expand All @@ -102,9 +102,10 @@ RegisterNUICallback("selected",function(data)
end

activeMenu:onSelect(ele)
if cb then cb('ok') end
end)

RegisterNUICallback("changed",function(data)
RegisterNUICallback("changed",function(data,cb)
if not activeMenu
or not data.index
or not data.value
Expand Down Expand Up @@ -136,6 +137,7 @@ RegisterNUICallback("changed",function(data)
elseif ele.inputType == "radio" then
ele.inputValue = data.value
end
if cb then cb('ok') end
end)

-- Keybind
Expand Down

0 comments on commit 86d4e91

Please sign in to comment.