Each attribute doesnt need a loading indicator
This commit is contained in:
parent
bd48a9e397
commit
21b0f59efc
|
@ -2125,12 +2125,8 @@ var UncachedProductAttributeElement = withAPIData(function (props) {
|
||||||
addTerm = _ref2.addTerm,
|
addTerm = _ref2.addTerm,
|
||||||
removeTerm = _ref2.removeTerm;
|
removeTerm = _ref2.removeTerm;
|
||||||
|
|
||||||
if (!terms.data) {
|
if (!terms.data || 0 === terms.data.length) {
|
||||||
return __('Loading');
|
return null;
|
||||||
}
|
|
||||||
|
|
||||||
if (0 === terms.data.length) {
|
|
||||||
return __('No attribute options found');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate cache.
|
// Populate cache.
|
||||||
|
|
|
@ -191,12 +191,8 @@ const UncachedProductAttributeElement = withAPIData( ( props ) => {
|
||||||
terms: '/wc/v2/products/attributes/' + props.attribute.id + '/terms'
|
terms: '/wc/v2/products/attributes/' + props.attribute.id + '/terms'
|
||||||
};
|
};
|
||||||
} )( ( { terms, selectedAttribute, selectedTerms, attribute, setSelectedAttribute, addTerm, removeTerm } ) => {
|
} )( ( { terms, selectedAttribute, selectedTerms, attribute, setSelectedAttribute, addTerm, removeTerm } ) => {
|
||||||
if ( ! terms.data ) {
|
if ( ! terms.data || 0 === terms.data.length ) {
|
||||||
return __( 'Loading' );
|
return null;
|
||||||
}
|
|
||||||
|
|
||||||
if ( 0 === terms.data.length ) {
|
|
||||||
return __( 'No attribute options found' );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate cache.
|
// Populate cache.
|
||||||
|
|
Loading…
Reference in New Issue