Ver a proveniência

feat: add button to collapse all in tree view (#17992) (#18003)

* Added button to collapse tree root node

* Removed unneccessary space

* Collapse all expanded nodes

* style: prettier

* refactor: load first level root nodes by default

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit e8b0b991ab)

Co-authored-by: Nikhil Kothari <nik.kothari22@live.com>
version-14
mergify[bot] há 2 anos
committed by GitHub
ascendente
cometimento
cfdc57add1
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4AEE18F83AFDEB23
1 ficheiros alterados com 4 adições e 0 eliminações
  1. +4
    -0
      frappe/public/js/frappe/views/treeview.js

+ 4
- 0
frappe/public/js/frappe/views/treeview.js Ver ficheiro

@@ -94,6 +94,10 @@ frappe.views.TreeView = class TreeView {
this.page.main.addClass("frappe-card");

if (this.opts.show_expand_all) {
this.page.add_inner_button(__("Collapse All"), function () {
me.tree.load_children(me.tree.root_node, false);
});

this.page.add_inner_button(__("Expand All"), function () {
me.tree.load_children(me.tree.root_node, true);
});


Carregando…
Cancelar
Guardar