From 3d4e5cbbaffbd5141a326d77fce179677b2459b6 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Tue, 20 Nov 2018 15:45:31 -0600 Subject: [PATCH] Math: Add math_textAttr. See #1601 --- docs/example-widget-math.html | 19 +++++++++++++++++++ docs/index.html | 2 +- js/widgets/widget-math.js | 10 ++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/example-widget-math.html b/docs/example-widget-math.html index 27f49476..d6c9673f 100644 --- a/docs/example-widget-math.html +++ b/docs/example-widget-math.html @@ -114,6 +114,8 @@ // called after all math calculations have completed console.log( 'math calculations complete', c.$table.find('[data-math="all-sum"]:first').text() ); }, + // cell data-attribute containing the math value to use (added v2.31.1) + math_textAttr : '', // see "Mask Examples" section math_mask : '#,##0.00', math_prefix : '', // custom string added before the math_mask value (usually HTML) @@ -196,6 +198,7 @@

Notes

' ).text() @@ -612,6 +616,8 @@ // e.g. '{content}' math_prefix : '', math_suffix : '', + // cell attribute containing the math value to use + math_textAttr : '', // no matching math elements found (text added to cell) math_none : 'N/A', math_event : 'recalculate',