mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
1.23k stars 280 forks source link

Implement Support for Dialog-Based Forms #4329

Open aress31 opened 4 days ago

aress31 commented 4 days ago

Summary

It would be great to add support for dialog-based forms. The DialogProvider already accommodates payload, prompt, and other types of dialogs. However, displaying forms in a dialog box is a common use case. By enhancing this functionality and possibly implementing a JSON configuration file to define fields that support multiple types—such as autocomplete and select—similar to the colDef in the DataGrid, we could significantly improve the user experience.

Examples

image

Motivation

Enhance the use case for the DialogProvider to make it more developer-friendly by enabling the use of dialog-based forms without requiring developers to manually implement all the form and validation logic.

Search keywords: dialogprovider form

Janpot commented 3 days ago

Forms and json based forms are definitely concepts we like to have on our roadmap. I see this feature request as a natural combination of those concepts with the dialog provider 👍

it won't be there tomorrow, but fits fully within the scope of toolpad core.

aress31 commented 3 days ago

@Janpot, awesome! I'm looking forward to this feature—it'll definitely help simplify my application and reduce boilerplate code. I imagine the JSON/JS file being similar to what's already in place for DataGrid, with methods like getValue, render, etc.