Here's my code in this div tag:
<div className="lk-btn-group btn-group clear">
{this.state.invoiceId ? <button className="btn btn-primary btn-sm pull-left" onClick={() => this.printInvoice()}>{abp.localization.localize('PrintInvoice')}</button> : null}
{this.state.delivery.delivery && !this.state.invoiceId ? <button className="btn btn-primary btn-sm pull-left" onClick={() => this.printDeliveryNote()}>{abp.localization.localize('PrintDeliveryNote')}</button> : null}
{this.state.delivery.delivery == null ? <button className="btn btn-primary btn-sm pull-right" onClick={() => {
this.markAsDelivered()
}} disabled={!this.state.beginningPercentage || !this.state.gallonsDelivered}>{this.props.completeDelivery}</button> : <span className="label label-default pull-right"><i className="fa fa-check"></i> {this.props.deliveryComplete}</span>}
</div>
My question is how do I get an input of 0 (zero) to not be the same as null? I need the ability for the user to go ahead and put a 0 and have my disabled button show rather than be disabled. I believe it's happening at the == null
in the fourth line of the div code above, which appears to me to disable the "btn btn-primary btn-sm pull right"
That's fine if the user hasn't entered anything yet, but I also need the 0 to be treated as any other value entered and not just null or empty if that makes sense. I still need all the other functionality to remain the same.