- Small bugfixes within value comparison for UiInput and small bugfixe in select repairing broken options.
This commit is contained in:
1 parent
b4fc4dd37f
commit
69c7121981
4 files changed
+14
-9
No files matched your search
@@ -21,7 +21,7 @@ class UiInput extends UiElement implements Extension {
|
||||
'tag-type' => "single",
|
||||
];
|
||||
|
||||
protected ? string $value;
|
||||
protected /* ? mixed */ $value;
|
||||
|
||||
protected string $name;
|
||||
|
||||
@@ -30,7 +30,7 @@ class UiInput extends UiElement implements Extension {
|
||||
return "<?php echo ( new \\" . static::class . "() )->buildHtml($arguments) ?>";
|
||||
}
|
||||
|
||||
public function buildHtml(string $name, ? string $value = null, array $attributes = [], array $options = []) : string
|
||||
public function buildHtml(string $name, /*? mixed */ $value = null, array $attributes = [], array $options = []) : string
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
@@ -41,6 +41,11 @@ class UiInput extends UiElement implements Extension {
|
||||
if ($options) {
|
||||
$this->options += $options;
|
||||
}
|
||||
|
||||
if ($attributes['class'] ?? false) {
|
||||
$attributes['class'] .= " {$this->attributes['class']}";
|
||||
unset($this->attributes['class']);
|
||||
}
|
||||
|
||||
$this->attributes([ 'name' => $name ] + $attributes + $this->attributes + $this->objectAttribute());
|
||||
|
||||
|
||||
Reference in new issue
Block a user