mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
fix: trim whitespaces from filters
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package runtime
|
||||
|
||||
import "github.com/wailsapp/wails/lib/interfaces"
|
||||
import "strings"
|
||||
|
||||
// Dialog exposes an interface to native dialogs
|
||||
type Dialog struct {
|
||||
@@ -22,7 +23,7 @@ func (r *Dialog) SelectFile(params ...string) string {
|
||||
title = params[0]
|
||||
}
|
||||
if len(params) > 1 {
|
||||
filter = params[1]
|
||||
filter = strings.Replace(params[1], " ", "", -1)
|
||||
}
|
||||
return r.renderer.SelectFile(title, filter)
|
||||
}
|
||||
@@ -40,7 +41,7 @@ func (r *Dialog) SelectSaveFile(params ...string) string {
|
||||
title = params[0]
|
||||
}
|
||||
if len(params) > 1 {
|
||||
filter = params[1]
|
||||
filter = strings.Replace(params[1], " ", "", -1)
|
||||
}
|
||||
return r.renderer.SelectSaveFile(title, filter)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user