Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Impossible to unselect TreeDropdownField

It was impossible to unselect TreeDropdownField.
'!' operator should not be used at all and identical comparison (===) was too "strict" (self.getValue() returns string but $(node).data('id') returns number).
  • Loading branch information...
commit e9ba54dec71f59c6f77235502cbc3df8e4ae0e71 1 parent 317495f
@uniun uniun authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  javascript/TreeDropdownField.js
View
2  javascript/TreeDropdownField.js
@@ -148,7 +148,7 @@
.jstree(self.getTreeConfig())
.bind('select_node.jstree', function(e, data) {
var node = data.rslt.obj, id = $(node).data('id');
- if(!firstLoad && !self.getValue() === id) {
+ if(!firstLoad && self.getValue() == id) {
// Value is already selected, unselect it (for lack of a better UI to do this)
self.data('metadata', null);
self.setTitle(null);
Please sign in to comment.
Something went wrong with that request. Please try again.