* Return the unformatted value as a string. * This can also return `null` if `rawValue` is null. * * @usage anElement.getNumericString(); * * @param {function|null} callback If a callback is passed, then the result is passed to it as its first argument, and the AutoNumeric o
(callback = null)
| 2480 | * @returns {string|null} |
| 2481 | */ |
| 2482 | getNumericString(callback = null) { |
| 2483 | let result; |
| 2484 | if (AutoNumericHelper.isNull(this.rawValue)) { |
| 2485 | result = null; |
| 2486 | } else { |
| 2487 | // Always return a numeric string |
| 2488 | // The following statement gets rid of the trailing zeros in the decimal places since the current method does not pad decimals |
| 2489 | result = AutoNumericHelper.trimPaddedZerosFromDecimalPlaces(this.rawValue); |
| 2490 | } |
| 2491 | |
| 2492 | this._executeCallback(result, callback); |
| 2493 | |
| 2494 | return result; |
| 2495 | } |
| 2496 | |
| 2497 | /** |
| 2498 | * Return the current formatted value of the AutoNumeric element as a string |