jmosbacher / pydantic-panel

Edit pydantic models with widgets from the awesome Panel package
MIT License
24 stars 3 forks source link

Support "form" workflow #11

Open MarcSkovMadsen opened 2 years ago

MarcSkovMadsen commented 2 years ago

Sometimes you don't want your model to change as soon as the value in your widget changes.

You might want to change several values before you press a submit button. Optionally some validation would run before changing the values of the underlying model.

It would be nice if this workflow was supported. It might be as simple as providing an example in the documentation on how to do this.

jmosbacher commented 2 years ago

Yeah this is definitely doable. I could add a mode attribute to the PydanticModelEditor widget that would then add a submit button at the end when if form mode.