Skip to content

Commit e370f7e

Browse files
committed
fix Htmldropdown arrow pb
1 parent bd8ea3b commit e370f7e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Ajax/semantic/html/modules/HtmlDropdown.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,19 @@ public function __construct($identifier, $value = "", $items = array(), $associa
4343
$this->setProperty("class", "ui dropdown");
4444
$this->_multiple = false;
4545
$content = [];
46+
$text = '';
4647
if ($value instanceof HtmlSemDoubleElement) {
4748
$text = $value;
48-
} else {
49+
} elseif ($value !== null) {
4950
$text = new HtmlSemDoubleElement("text-" . $this->identifier, "div");
5051
$text->setClass("text");
5152
$this->setValue($value);
5253
}
53-
$content = [
54-
"text" => $text
55-
];
54+
if ($text != null) {
55+
$content = [
56+
"text" => $text
57+
];
58+
}
5659
$content["arrow"] = new HtmlIcon($identifier . "-icon", "dropdown");
5760
$this->content = $content;
5861
$this->tagName = "div";

0 commit comments

Comments
 (0)