tauri
tauri copied to clipboard
[feat] Implement `prompt`
Describe the problem
Hi! Great framework!
I was trying to create a quick app, and I wanted to use browser's prompt function
There's a @tauri-apps/api/dialog package which provides you with confirm, alert analogues, and even file selection. But, unfortunately, there is no prompt
Describe the solution you'd like
In browsers, it looks like this:
Would be cool to see the same thing:
import { prompt } from '@tauri-apps/api/dialog'
const name = await prompt("Type your name")
Alternatives considered
I was also trying to use window.prompt. Console says this function exists, but it does nothing
Additional context
No response
Would be a cool feature, but the upstream crate (https://github.com/PolyMeilex/rfd) doesn't support this yet, so it may take a while to implement.
Hope to see this in v2