mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(web/dialog): Add checkbox type
This commit is contained in:
@@ -4,12 +4,20 @@ function lib.inputDialog(heading, rows)
|
||||
if input then return end
|
||||
input = promise.new()
|
||||
|
||||
-- Backwards compat with string tables
|
||||
for i = 1, #rows do
|
||||
if type(rows[i]) == 'string' then
|
||||
rows[i] = {type = 'input', label = rows[i]}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
SetNuiFocus(true, true)
|
||||
SendNUIMessage({
|
||||
action = 'openDialog',
|
||||
data = {
|
||||
heading = heading,
|
||||
inputs = rows
|
||||
rows = rows
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user