Skip to content

Commit 220e746

Browse files
authored
fix(core): set dialog title via API, closes #4029 (#4030)
1 parent d31167c commit 220e746

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.changes/fix-dialog-title.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes the `title` option being ignored in the dialog API endpoints.

core/tauri/src/endpoints/dialog.rs

+6
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ impl Cmd {
9595
{
9696
dialog_builder = dialog_builder.set_parent(&context.window);
9797
}
98+
if let Some(title) = options.title {
99+
dialog_builder = dialog_builder.set_title(&title);
100+
}
98101
if let Some(default_path) = options.default_path {
99102
dialog_builder = set_default_path(dialog_builder, default_path);
100103
}
@@ -143,6 +146,9 @@ impl Cmd {
143146
{
144147
dialog_builder = dialog_builder.set_parent(&context.window);
145148
}
149+
if let Some(title) = options.title {
150+
dialog_builder = dialog_builder.set_title(&title);
151+
}
146152
if let Some(default_path) = options.default_path {
147153
dialog_builder = set_default_path(dialog_builder, default_path);
148154
}

0 commit comments

Comments
 (0)