maxfordham / ipyautoui

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

🐛 Fix display issue of nested widgets with nullable #302

Closed ollyhensby closed 3 months ago

ollyhensby commented 3 months ago

Setting the value of an AutoObject that contains a nullable NestedObject now appears if the value set is not None. If it is None the widget is hidden as expected.

The reason this wasn't working was because there was an if statement that was checking whether the value passed is a list or dict. There was no "else" statement to deal with this. From a review, it looks like this "if" statement doesn't need to exist at all so it has been removed.