maxfordham / ipyautoui

create ipywidgets user input form pydantic model or jsonschema
https://maxfordham.github.io/ipyautoui/
38 stars 5 forks source link

✨ EditGrid: UiDelete to use preview_yaml_string #324

Open ollyhensby opened 3 weeks ago

ollyhensby commented 3 weeks ago

Is your feature request related to a problem? Please describe. I think it would look better if when warn_on_delete is set to True, for the preview to be YAML instead of JSON.

Describe the solution you'd like In the code, set _update_display method to:

def _update_display(self):
        with self.out_delete:
            clear_output()
            display(preview_yaml_string(yaml.dump(self.value_summary))) 

The output will look like this:

image