tauri-apps / tauri-apps/plugins-workspace

[FEATURE] automatically set parent dialog with `window.dialog().file()`

Open
#2,563 0 comments 1 reaction 0 assignees View on GitHub
plugin: dialog type: feature request
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

To open file dialog correctly linked to window, we have to manually link with `set_parent` like this:

```rust
#[tauri::command]
#[specta::specta]
pub async fn some_command(window: Window) {
let mut file = window
.dialog()
.file()
.set_parent(&window)
.blocking_pick_folder();
}
```

However, I think it's better to link dialog to window by default to reduce mistakes

It may needs some trick on traits and/or breaking changes so I think it may be good to have in v3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.