From 062e3f92d8dd7fafce000ba83df514566666b751 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Tue, 10 Sep 2024 07:06:57 +0000 Subject: [PATCH] * [story#66940] add renderCell. --- lib/zin/wg/pivottable/v1.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/zin/wg/pivottable/v1.php b/lib/zin/wg/pivottable/v1.php index a034a3533b..ad4706b51f 100644 --- a/lib/zin/wg/pivottable/v1.php +++ b/lib/zin/wg/pivottable/v1.php @@ -56,6 +56,7 @@ class pivotTable extends wg list($cols, $data, $cellSpan, $filters, $onRenderCell, $onCellClick) = $this->prop(array('cols', 'data', 'cellSpan', 'filters', 'onRenderCell', 'onCellClick')); $filterCount = count($filters); + if(empty($onRenderCell)) $onRenderCell = jsRaw('renderCell'); return dtable ( setID('designTable'), @@ -65,7 +66,7 @@ class pivotTable extends wg set::cols($cols), set::data($data), set::emptyTip($lang->pivot->noPivotTip), - set::onRenderCell(jsRaw('renderCell')), + set::onRenderCell($onRenderCell), set::onCellClick($onCellClick), set::rowKey('ROW_ID'), set::plugins(array('header-group', $cellSpan ? 'cellspan' : null)),