skinnybrit51 / editable-grid

Bootstrap grid with CRUD functionality.
MIT License
30 stars 4 forks source link

tree view in combination with edit has a small bug #102

Open fiechter opened 6 years ago

fiechter commented 6 years ago

_valueChanged has a small bug in combination with hierarchies. If an child item is edited, it doesn't find the element to fire the on changed event.

The following workaround did it for me, but might break something else. .findWhere = function(obj, attrs) { var result = .find(obj, .matches(attrs)); if (result == null){ for (var i = 0; i < obj.length; i++) { if (obj[i].children) { result = .findWhere(obj[i].children, attrs); if (result != null) { return result; } } } } return result; };

skinnybrit51 commented 6 years ago

I'll try out your fix this weekend. But feel free to make a pull request with your change in the meantime. Thank you for taking the time in reaching out to me.