ipcMain.on("event", async (event) => {
const result = await dialog.showOpenDialog(mainWindow, {
properties: ["openDirectory"],
});
event.returnValue = result.filePaths;
});
on macOS I see files being grayed out, but on windows I can only see folders.
How can I make it so windows folder selection dialog box shows the files inside the folder I select?
example on mac (files being grayed out):
You should use a OpenFileDialog
dialog.showOpenDialog({ properties: ['openFile', 'multiSelections'] })
As per documentation that can be found here
electronjs.org/docs/latest/api/dialog