mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-12-01 05:24:47 +00:00
fix(client/radial): onSelect export handler
currentRadial is cleared before triggering the export.
This commit is contained in:
1 parent
053d5d45ec
commit
8848f6d6bc
1 file changed
+3
-1
@@ -194,6 +194,8 @@ RegisterNUICallback('radialClick', function(index, cb)
|
|||||||
item = menuItems[itemIndex]
|
item = menuItems[itemIndex]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local menuResource = currentRadial and currentRadial.resource or item.resource
|
||||||
|
|
||||||
if item.menu then
|
if item.menu then
|
||||||
menuHistory[#menuHistory + 1] = { id = currentRadial and currentRadial.id, option = item.menu }
|
menuHistory[#menuHistory + 1] = { id = currentRadial and currentRadial.id, option = item.menu }
|
||||||
showRadial(item.menu)
|
showRadial(item.menu)
|
||||||
@@ -205,7 +207,7 @@ RegisterNUICallback('radialClick', function(index, cb)
|
|||||||
|
|
||||||
if onSelect then
|
if onSelect then
|
||||||
if type(onSelect) == 'string' then
|
if type(onSelect) == 'string' then
|
||||||
return exports[currentRadial and currentRadial.resource or item.resource][onSelect](0, currentMenu, itemIndex)
|
return exports[menuResource][onSelect](0, currentMenu, itemIndex)
|
||||||
end
|
end
|
||||||
|
|
||||||
onSelect(currentMenu, itemIndex)
|
onSelect(currentMenu, itemIndex)
|
||||||
|
|||||||
Reference in new issue
Block a user