We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I needed to get the parent text during the onChange event, so hacked the code using:
--- C:\git\combo-tree\comboTreePlugin.js 2022-03-14 16:43:17.000000000 -0700 +++ C:\git\myApp\static\Drop-Down-Combo-Tree\comboTreePlugin.js 2022-03-11 14:46:57.000000000 -0700 @@ -323,13 +323,15 @@ return false; } if ($(ctItem).data("selectable") == true) { this._selectedItem = { id: $(ctItem).attr("data-id"), - title: $(ctItem).text() + title: $(ctItem).text(), + obj:$(ctItem), + parent: $(ctItem).closest('.ComboTreeItemParent').children('.comboTreeItemTitle') }; let check = this.isItemInArray(this._selectedItem, this.options.source); if (check) { var index = this.isItemInArray(this._selectedItem, this._selectedItems); if (index) { @@ -344,13 +346,15 @@ }; ComboTree.prototype.singleItemClick = function (ctItem) { if ($(ctItem).data("selectable") == true) { this._selectedItem = { id: $(ctItem).attr("data-id"), - title: $(ctItem).text() + title: $(ctItem).text(), + obj:$(ctItem), + parent: $(ctItem).closest('.ComboTreeItemParent').children('.comboTreeItemTitle') }; } // if selectable this.refreshInputVal(); this.closeDropDownMenu(); }; @@ -404,13 +408,13 @@ } this._elemInput.val(tmpTitle); this._elemInput.trigger('change'); if (this.changeHandler) - this.changeHandler(); + this.changeHandler(this); }; ComboTree.prototype.dropDownMenuHover = function (itemSpan, withScroll) { this._elemItems.find('span.comboTreeItemHover').removeClass('comboTreeItemHover'); $(itemSpan).addClass('comboTreeItemHover'); this._elemHoveredItem = $(itemSpan);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I needed to get the parent text during the onChange event, so hacked the code using:
The text was updated successfully, but these errors were encountered: