fix: nui input cannot paste (#187)

This commit is contained in:
yetone
2024-08-24 16:25:08 +08:00
committed by GitHub
parent dbf2509d44
commit b8b5a3086e
2 changed files with 13 additions and 4 deletions

View File

@@ -1385,9 +1385,11 @@ function Sidebar:create_input()
width = win_width - 2, -- Subtract the width of the input box borders
},
}, {
disable_cursor_position_patch = true,
prompt = Config.windows.prompt.prefix,
default_value = "",
default_value = " ",
on_submit = function(user_input)
user_input = Utils.trim_spaces(user_input)
if user_input == "" then
self:create_input()
return