mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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).
This commit is contained in:
parent
317495f8ef
commit
e9ba54dec7
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user