-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
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
Select All #20
Comments
Hi Rod, Glad to see ComboTree is working nice in your project. Actually, I did not plan to add this feature, thinking of it is produced to handle large amounts of options. Good luck... |
i write a code... ComboTree.prototype.selectAll = function () {
// clear
for (i = 0; i < this._selectedItems.length; i++) {
let itemElem = $(
'#' + this.comboTreeId + 'Li' + this._selectedItems[i].id
);
$(itemElem).find('input').prop('checked', false);
}
this._selectedItems = [];
// select all
var selected = this._selectedItems;
$('#' + this.comboTreeId + 'ComboTreeSourceUlmain')
.find("input[type='checkbox']")
.each(function (idx, elem) {
console.log(elem);
var $itemElem = $(elem).parent('span').first();
console.log($itemElem);
var item = {
id: $itemElem.data('id'),
title: $itemElem.text(),
};
$(elem).prop('checked', true);
selected.push(item);
});
this.refreshInputVal();
}; |
Thanks, |
ok. I write code and localize to jp and using in my work.. |
I have made PR. please check |
Hi Norainu,
I have merged your PR, thanks!
…_____________________________________________________________
*Erhan FIRAT*
+90 530 233 7712
Fullstack Developer on Web & Cloud Technologies
Middle East Technical University, CEIT'11
On Sat, Oct 1, 2022 at 10:11 AM norainu ***@***.***> wrote:
I have made PR. please check
#52 <#52>
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARXPLUXPQO5SII2OYKKNHTWA7P3DANCNFSM4KBK3B5A>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello
We're using this component for multiselect on a WP website - it's working perfectly.
One thing we've been asked for is a 'Select All' option. I know I can do this manually outside of the component, but I notice that you have a 'Select All' option on your development roadmap. Happy to wait for this - or have a go myself.
Do you have a plan to add this soon? If you'd like me to have a go at implementing within the component - do you have a suggestion as to where you think it should appear? I can code but I'm not the worlds best designer and would hate to mess up a really well thought out add on.
Cheers Rod
The text was updated successfully, but these errors were encountered: