Fix bug in SpeciesColorPicker loading state
Oops, I made a fix to the color picker, but not the species picker! Updated them both to match.
This commit is contained in:
parent
f699d867e5
commit
6d05fb8680
1 changed files with 5 additions and 2 deletions
|
@ -216,8 +216,11 @@ function SpeciesColorPicker({
|
|||
aria-label="Pet species"
|
||||
value={speciesId}
|
||||
// We also wait for the valid pairs before enabling, so users can't
|
||||
// trigger change events we're not ready for.
|
||||
isLoading={allSpecies.length === 0 || loadingValids}
|
||||
// trigger change events we're not ready for. Also, if the caller
|
||||
// hasn't provided species and color yet, assume it's still loading.
|
||||
isLoading={
|
||||
allColors.length === 0 || loadingValids || !speciesId || !colorId
|
||||
}
|
||||
isDisabled={isDisabled || speciesIsDisabled}
|
||||
// Don't fade out in the speciesIsDisabled case; it's more like a
|
||||
// read-only state.
|
||||
|
|
Loading…
Reference in a new issue