tauri-apps / tauri-apps/plugins-workspace

[v2 - Linux] Filter change in Save Dialog does not update file name extension

Open
#1,106 1 comment 0 reactions 0 assignees View on GitHub
platform: linux plugin: dialog status: upstream type: bug
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

Description: When executing a save dialog with multiple filters, when the filter is changed, the value in the Name text box is not updated. This forces the user to type in the correct file extension manually when saving. Given that VSCode (Electron) has the same issue, I'm guessing the problem is with the underlying dialog control being used from the OS/Desktop Environment, etc.

Expected Behavior: Ideally, if the user changes the filter, the value in Name should be updated.

Alternative?: If possible, update save method to return the selected filter along with the file name (sort of like what is done with OpenDialogReturn).

```ts
const fileName = await dialog.save({
title: 'Save Workbook',
defaultPath: workbookFullName ?? settings.workbookDirectory,
filters: [{
name: 'Workbooks
extensions: 'wkbk'
}, {
name: 'Comma-delimited Export',
extensions: 'csv'
}]
})

```

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.