Closed vague2k closed 4 months ago
@vague2k please check the docs at https://nui-components.grapp.dev/docs/renderer#render. In your case, body
should be a function, let me know if this solves your issue.
local body = function()
return n.columns(…)
end
yeah that works, slight oversight thanks!
In my plugin I want to render the ui through a function so it can mapped to a keymap, but when the function is called a 2nd time a blank box appears.
I'm pretty sure this is a bug, but if it is not, and there's a specific way a plugin should handle spawning the UI through a function, please let me know!
steps to reproduce
renderer:close()
)visual reproduction
https://github.com/grapp-dev/nui-components.nvim/assets/121782036/e591a159-6383-4e0d-8092-be5fc0d7da68
the code i used in the visual reproduction