Disable species picker for species-specific items
This commit is contained in:
parent
6c84baca03
commit
f699d867e5
2 changed files with 10 additions and 1 deletions
|
@ -690,6 +690,7 @@ function ItemPageOutfitPreview({ itemId }) {
|
||||||
appearanceId: null,
|
appearanceId: null,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
speciesIsDisabled={isProbablySpeciesSpecific}
|
||||||
size="sm"
|
size="sm"
|
||||||
showPlaceholders
|
showPlaceholders
|
||||||
// This is just a UX affordance: while we could handle invalid states
|
// This is just a UX affordance: while we could handle invalid states
|
||||||
|
|
|
@ -25,6 +25,7 @@ function SpeciesColorPicker({
|
||||||
speciesPlaceholderText = "",
|
speciesPlaceholderText = "",
|
||||||
stateMustAlwaysBeValid = false,
|
stateMustAlwaysBeValid = false,
|
||||||
isDisabled = false,
|
isDisabled = false,
|
||||||
|
speciesIsDisabled = false,
|
||||||
size = "md",
|
size = "md",
|
||||||
onChange,
|
onChange,
|
||||||
}) {
|
}) {
|
||||||
|
@ -217,7 +218,14 @@ function SpeciesColorPicker({
|
||||||
// We also wait for the valid pairs before enabling, so users can't
|
// We also wait for the valid pairs before enabling, so users can't
|
||||||
// trigger change events we're not ready for.
|
// trigger change events we're not ready for.
|
||||||
isLoading={allSpecies.length === 0 || loadingValids}
|
isLoading={allSpecies.length === 0 || loadingValids}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled || speciesIsDisabled}
|
||||||
|
// Don't fade out in the speciesIsDisabled case; it's more like a
|
||||||
|
// read-only state.
|
||||||
|
_disabled={
|
||||||
|
speciesIsDisabled
|
||||||
|
? { opacity: "1", cursor: "not-allowed" }
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
onChange={onChangeSpecies}
|
onChange={onChangeSpecies}
|
||||||
size={size}
|
size={size}
|
||||||
valids={valids}
|
valids={valids}
|
||||||
|
|
Loading…
Reference in a new issue