Skip to content

Commit

Permalink
fix combo and set label error
Browse files Browse the repository at this point in the history
  • Loading branch information
UmSenhorQualquer committed Apr 26, 2019
1 parent 5a4618d commit 3c3b708
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyforms_web/controls/control_combo.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def value(self):
@value.setter
def value(self, value):
for i, (key, val) in enumerate(self._items.items()):
value = self._types[i](value) if value is not None else None
value = None if value is None or value=='' else self._types[i](value)
if value == val:
if self._value != value:
self._value = value
Expand Down
2 changes: 1 addition & 1 deletion pyforms_web/web/static/pyforms.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyforms_web/web/static/pyformsjs/ControlBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class ControlBase{
@param {string} value - Label to set.
*/
set_label(value){
$( "#"+this.place_id()+' label' ).first().html(value);
$( `#${this.place_id()} label[for='${this.control_id()}']` ).first().html(value);
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 3c3b708

Please sign in to comment.