Prefill name in dialog box opened using showOpenDialogSync() in Electron JS

0

Issue

I am opening a dialog box which allows the user to enter a folder name and then when he/she clicks ok, the folder is created at the specified location. So I want to provide a default name when the dialog box opens at first.

Solution

Using showMessageBoxSync solves the issue.

It opens the folders in the path and when it cannot find any existing folder, it adds the remaining path to the user input box.

Answered By – quirk

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More