Skip to content

Commit cb22e73

Browse files
committed
Fix HtmlDropdown addIcon bug
1 parent 9e563a9 commit cb22e73

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Ajax/semantic/html/collections/form/HtmlFormDropdown.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Ajax\semantic\html\collections\form;
44

5-
use Ajax\semantic\html\collections\form\HtmlFormField;
65
use Ajax\semantic\html\modules\HtmlDropdown;
76

87
class HtmlFormDropdown extends HtmlFormField {

Ajax/semantic/html/modules/HtmlDropdown.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ public function addItem($item,$value=NULL,$image=NULL,$description=NULL){
6666
public function addIcon($icon,$before=true,$labeled=false){
6767
$this->removeArrow();
6868
$this->addIconP($icon,$before,$labeled);
69-
return $this->getElementById("text-".$this->identifier, $this->content)->setWrapAfter("");
69+
$elm=$this->getElementById("text-".$this->identifier, $this->content);
70+
if(isset($elm)){
71+
$elm->setWrapAfter("");
72+
}
73+
return $this;
7074
}
7175

7276
public function addIcons($icons){

0 commit comments

Comments
 (0)