diff --git a/src/Forms/Tab.php b/src/Forms/Tab.php index fc2a08a2c..bc267cbb5 100644 --- a/src/Forms/Tab.php +++ b/src/Forms/Tab.php @@ -137,12 +137,16 @@ class Tab extends CompositeField public function getAttributes() { - return array_merge( + $attributes = array_merge( $this->attributes, [ 'id' => $this->ID(), 'class' => 'tab ' . $this->extraClass() ] ); + + $this->extend('updateAttributes', $attributes); + + return $attributes; } } diff --git a/src/Forms/TabSet.php b/src/Forms/TabSet.php index bfa3a144b..f8aabcf63 100644 --- a/src/Forms/TabSet.php +++ b/src/Forms/TabSet.php @@ -178,13 +178,17 @@ class TabSet extends CompositeField public function getAttributes() { - return array_merge( + $attributes = array_merge( $this->attributes, [ 'id' => $this->ID(), 'class' => $this->extraClass() ] ); + + $this->extend('updateAttributes', $attributes); + + return $attributes; } /**