Fix error displaying block after removing variation (#40255)
* Fix error displaying block after removing variation * Disable Add button * Add changelog
This commit is contained in:
parent
6aa55f6334
commit
d72316490d
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Fix error displaying block after removing variation #40255
|
|
@ -403,7 +403,9 @@ export const NewAttributeModal: React.FC< NewAttributeModalProps > = ( {
|
||||||
}
|
}
|
||||||
value={
|
value={
|
||||||
attribute ===
|
attribute ===
|
||||||
null
|
null ||
|
||||||
|
attribute ===
|
||||||
|
undefined
|
||||||
? []
|
? []
|
||||||
: attribute.terms
|
: attribute.terms
|
||||||
}
|
}
|
||||||
|
@ -506,7 +508,9 @@ export const NewAttributeModal: React.FC< NewAttributeModalProps > = ( {
|
||||||
label={ addAccessibleLabel }
|
label={ addAccessibleLabel }
|
||||||
disabled={
|
disabled={
|
||||||
values.attributes.length === 1 &&
|
values.attributes.length === 1 &&
|
||||||
values.attributes[ 0 ] === null
|
( values.attributes[ 0 ] === null ||
|
||||||
|
values.attributes[ 0 ] ===
|
||||||
|
undefined )
|
||||||
}
|
}
|
||||||
onClick={ () =>
|
onClick={ () =>
|
||||||
onAddingAttributes( values )
|
onAddingAttributes( values )
|
||||||
|
|
Loading…
Reference in New Issue