At this of @ox_inventory/client.lua you can replace all the code of the callback with this
RegisterNUICallback('giveItem', function(data, cb)
cb(1)
TriggerEvent('ox_inventory:closeInventory')
local id = exports.targeting:StartTargeting({})
giveItemToTarget(id, data.slot, data.count)
end)