JSFiddle - React, Tailwind, and code Playground
JavaScript
selectedRows = [{"itemNumber":"","lineNumber":1,"description":"PUMP,COMPLETE, P/N E12LYTFS-137","uom":"","poQuantity":"1","recievedQuantity":"3","isMatched":false,"p2PLineItemId":"168512","quantityUnitPrice":"1","buyerItemNumber":null}];
ispoQuantityInvalid = () => (element, index, array) => {
alert()
return this.isEmpty(element.poQuantity);//replaced poQuantity with quantityUnitPrice to avoid decimal
}
console.log(this.selectedRows)
if (this.selectedRows.some(this.ispoQuantityInvalid)) {
console.log('po qty is null or empty')
return;
}
isEmpty = (value) => {
return (value == null || value.length === 0 || value === '' || value == 0);
}