From d01ddb2d3dc578146c5040d9ebc70a468b2f8ff2 Mon Sep 17 00:00:00 2001 From: Kimo Knowles Date: Mon, 6 Jan 2025 05:42:09 +0100 Subject: [PATCH] [nested-v-grid] Update docs --- src/re_demo/nested_grid.cljs | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/re_demo/nested_grid.cljs b/src/re_demo/nested_grid.cljs index d394570c..66a01da8 100644 --- a/src/re_demo/nested_grid.cljs +++ b/src/re_demo/nested_grid.cljs @@ -908,11 +908,17 @@ [rc/title :level :level2 :label "Key differences:"] [:div {:style {:width 500}} [rc/title :level :level3 :label "Trees are hiccup-like."] - " The tree " [:code "[:a :b :c]"] - "does " [:i "not"] " represent three siblings. Instead, " [:code ":a"] - " is the parent, and " [:code ":b :c"] " are children. Explicitly, " - "the branch function is " [:code "sequential?"] - " and the children function is " [:code "rest"] "." + [:p + " The tree " [:code "[:a :b :c]"] + "does " [:i "not"] " represent three siblings. Instead, " [:code ":a"] + " is the parent, and " [:code ":b :c"] " are children. Explicitly, " + "the branch function is " [:code "sequential?"] + " and the children function is " [:code "rest"] "."] + [rc/title :level :level3 :label "Root headers are hidden by default."] + [:p + " For instance, " [:code ":row-tree [:a [:b 1 2] [:c 8 9]]"] + " displays " [:code ":b :c"] " as two top-level headers, each with two children." + "The root header, " [:code ":a"] ", does not appear."] [rc/title :level :level3 :label "Header main-size can only declared in the tree."] [:code ":row-height"] " and " [:code ":column-width"] " are the main-sizes." @@ -932,16 +938,15 @@ "Note that keywords appear at tree depths 1 and 2, and numbers at a depth of 3. " "In this case, you can pass " [:code " :row-header-widths [40 40 20]"] ". " "This would make the keyword headers 40-wide, and the number headers 20-wide." - [rc/title :level :level3 :label [:span "To handle header size changes, use " [:code ":on-resize"] "."]] + [rc/title :level :level3 :label [:span "To handle header size changes, pass a function to " [:code ":on-resize"] "."]] [:p [:code ":on-resize"] " takes keyword arguments:" [:ul - [:li [:code ":dimension"] " - which sort of ]]]"]]] - [:strong [:code ":row-tree-depth"] " and " [:code ":column-tree-depth"]] - "are required props." - [rc/title :level :level3 :label "Tree roots are hidden by default."] - " For instance, " [:code ":row-tree [:a [:b 1 2] [:c 8 9]]"] - " displays " [:code ":b :c"] " as two top-level headers, each with two children." - "The root node, " [:code ":a"] ", is hidden."]]]]) + [:li [:code ":header-dimension"] " - either " [:code ":row"] " or " [:code ":column"]] + [:li [:code ":size-dimension"] " - either " [:code ":width"] " or " [:code ":height"]] + [:li [:code ":cross-size?"] " - True when you change column-header height or row-header width."] + [:li [:code ":keypath"] " - Vector of indices. Points to a location in a header-tree when resizing a main-size." + " Points to a location in " [:code ":row-header-widths"] " or " [:code ":column-header-heights"] + " when resizing a cross-size."]]]]]]]) (defn demos [] (let [tabs [(when goog/DEBUG