Kaynağa Gözat

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] 2 yıl önce
committed by GitHub
ebeveyn
işleme
cfdc57add1
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. +4
    -0
      frappe/public/js/frappe/views/treeview.js

+ 4
- 0
frappe/public/js/frappe/views/treeview.js Dosyayı Görüntüle

@@ -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);
});


Yükleniyor…
İptal
Kaydet