mui / toolpad

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

Unable to fetch images in "Dog Images" template app #1086

Closed apedroferreira closed 1 year ago

apedroferreira commented 1 year ago

Duplicates

Latest version

Current behavior 😯

It's not possible to fetch new dog images in the respective template app unless a sub breed is defined. This seems to be because the " sub breed" input now defaults to "January" when it's empty, which is one of the default values for the Select component.

Expected behavior 🤔

It should be possible to fetch new dog images in the respective template app even if sub-breed is empty, or has no options.

Steps to reproduce 🕹

Steps:

  1. Make new app from the "Fetch images" template (app that fetches dog images according to breeds).
  2. Try to fetch an image.
  3. No new image is fetched - the default image stays the same.

Context 🔦

No response

Your environment 🌎

No response

Janpot commented 1 year ago

It looks like the defaultValue implementation isn't the right one for this use case. I wonder whether we should revisit what defaultValue means.

WangLarry commented 1 year ago

@Janpot https://github.com/mui/mui-toolpad/pull/1091#issuecomment-1267829977

bharatkashyap commented 1 year ago

Fixed by #1106