From f2296452a2e0499d9cb58e9db41d2572e577dc32 Mon Sep 17 00:00:00 2001 From: belenski Date: Mon, 3 May 2021 13:51:06 +0300 Subject: [PATCH] Issue #44 fix This change will allow usage of the "class" option for the grouped fields --- Grid/Group/GroupColumn.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Grid/Group/GroupColumn.php b/Grid/Group/GroupColumn.php index 2b8ae26..4bc54e6 100644 --- a/Grid/Group/GroupColumn.php +++ b/Grid/Group/GroupColumn.php @@ -33,6 +33,11 @@ public function setColumnClassCmb2() { } public function __construct( $field, \Cmb2Grid\Grid\Cmb2Grid $grid ) { + if ( is_array( $field ) && isset( $field['class'] ) ) { + $this->setColumnClass( $field['class'] ); + $field = $field[0]; + } + $this->setParentFieldId( $field[0] ); $this->setFieldId( $field[1] ); $field = cmb2_get_field( $grid->getCmb2Obj(), $this->getParentFieldId() );