We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77975a9 commit 38a7a9cCopy full SHA for 38a7a9c
src/AdamWathan/Form/Elements/Element.php
@@ -55,7 +55,13 @@ public function removeClass($class)
55
if (! isset($this->attributes['class'])) {
56
return $this;
57
}
58
+
59
$class = trim(str_replace($class, '', $this->attributes['class']));
60
+ if ($class == '') {
61
+ $this->removeAttribute('class');
62
+ return $this;
63
+ }
64
65
$this->setAttribute('class', $class);
66
67
0 commit comments