playbook_ui_docs 13.5.0.pre.alpha.PLAY823globalpropoverflow1191 → 13.5.0.pre.alpha.play984collapsiblekithidestooltips1203

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f6ec1ed1376960252be753472457fd1a68df5724a0517ecc167d9846b99c95c
4
- data.tar.gz: 87d31f3c89a2134b7d74a270a674fb1aa38fc9d51c82729de855f05e8b827e8c
3
+ metadata.gz: bdffe95c54b0757edbf916c158fe0e74794fff71c94d99bac09c95d7387c12df
4
+ data.tar.gz: 0ec99686bb3b620cb3411ee6921b9611df02d2435ecfaac59cbfeb0c41160a46
5
5
  SHA512:
6
- metadata.gz: 8e7bbc2a3be4f717101e8a274603ee0b5918c6dace9f430e81d9840047a97d2c2b3d6c23e25385c9b752e678aaf4e3ef66ab3d2e072cb9880954350c58351773
7
- data.tar.gz: 620653b24b3214f13d0a6eb07a5afd05a7dfa7e10e51975298d6cabecddbec7f99253fb7a4a1243065c7c938624b6ffb4dd9767920b1db3a2a7ec274188d7d8e
6
+ metadata.gz: 10ee5bd3ffb489721c0e3df6a8f4885e617550c70d8e49f59cb6d19d7a4c593b662e6ca1155e7414beefe64194f6c2005806cfb4e48a30c01a485d36dfd5bf7c
7
+ data.tar.gz: 465f237b14da61176f586b812ee67c243ed002d3d0b0710f96d6ad1b6b0245c3b0937d0576a7d88c238941c1dbca17cf7ddea8f81242e538bec3f8be4e937b50
@@ -2,27 +2,31 @@
2
2
  <thead>
3
3
  <tr>
4
4
  <%= pb_rails("table/table_header", props: {
5
- id: "name",
6
- colspan: 2,
5
+ text: "Territory",
6
+ id: "territory",
7
7
  sort_menu: [
8
- { item: "Name", link: "?q[sorts]=name+desc", active: false, direction: "desc" },
9
- { item: "Name", link: "?q[sorts]=name+asc", active: true, direction: "asc" },
8
+ { item: "Territory", link: "?sort=territory_desc", active: params["sort"] == "territory_desc", direction: "desc" },
9
+ { item: "Territory", link: "?sort=territory_asc", active: params["sort"] == "territory_asc", direction: "asc" }
10
10
  ],
11
11
  }) %>
12
12
  <%= pb_rails("table/table_header", props: {
13
- text: "Age",
14
- id: "age",
13
+ id: "name",
14
+ text: "Full Name",
15
+ colspan: 2,
15
16
  sort_menu: [
16
- { item: "Age", link: "?q[sorts]=age+desc", active: false, direction: "desc" },
17
- { item: "Age", link: "?q[sorts]=age+asc", active: false, direction: "asc" },
17
+ { item: "First Name Descending", link: "?sort=firstname_desc", active: params["sort"] == "firstname_desc", direction: "desc" },
18
+ { item: "First Name Ascending", link: "?sort=firstname_asc", active: params["sort"] == "firstname_asc", direction: "asc" },
19
+ { item: "Last Name Descending", link: "?sort=lastname_desc", active: params["sort"] == "lastname_desc", direction: "desc" },
20
+ { item: "Last Name Ascending", link: "?sort=lastname_asc", active: params["sort"] == "lastname_asc", direction: "asc" }
18
21
  ],
19
22
  }) %>
20
23
  <%= pb_rails("table/table_header", props: {
21
- text: "Territory",
22
- id: "territory",
24
+ text: "Age",
25
+ id: "age",
26
+ sort_dropdown: true,
23
27
  sort_menu: [
24
- { item: "Territory", link: "?q[sorts]=territory+desc", active: false, direction: "desc" },
25
- { item: "Territory", link: "?q[sorts]=territory+asc", active: false, direction: "asc" },
28
+ { item: "Age Descending", link: "?sort=age_desc", active: params["sort"] == "age_desc", direction: "desc" },
29
+ { item: "Age Ascending", link: "?sort=age_asc", active: params["sort"] == "age_asc", direction: "asc" }
26
30
  ],
27
31
  }) %>
28
32
  <%= pb_rails("table/table_header", props: { text: "Job Title" }) %>
@@ -30,25 +34,25 @@
30
34
  </thead>
31
35
  <tbody>
32
36
  <tr>
33
- <td>Name 1</td>
34
- <td>Name 2</td>
35
- <td>Value 3</td>
36
- <td>Value 4</td>
37
- <td>Value 5</td>
37
+ <td>Ter 1</td>
38
+ <td>First Name 1</td>
39
+ <td>Last Name 1</td>
40
+ <td>Age 1</td>
41
+ <td>Job 1</td>
38
42
  </tr>
39
43
  <tr>
40
- <td>Name 1</td>
41
- <td>Name 2</td>
42
- <td>Value 3</td>
43
- <td>Value 4</td>
44
- <td>Value 5</td>
44
+ <td>Ter 2</td>
45
+ <td>First Name 2</td>
46
+ <td>Last Name 2</td>
47
+ <td>Age 2</td>
48
+ <td>Job 2</td>
45
49
  </tr>
46
50
  <tr>
47
- <td>Name 1</td>
48
- <td>Name 2</td>
49
- <td>Value 3</td>
50
- <td>Value 4</td>
51
- <td>Value 5</td>
51
+ <td>Ter 3</td>
52
+ <td>First Name 3</td>
53
+ <td>Last Name 3</td>
54
+ <td>Age 3</td>
55
+ <td>Job 3</td>
52
56
  </tr>
53
57
  </tbody>
54
58
  <% end %>
@@ -1 +1,8 @@
1
- A kit that produces a `<th>` tag. You can also use the `sort_menu` prop to make the header a sortable link, just like <a href="https://playbook.powerapp.cloud/kits/filter#sort-only" target="_blank">our filter kit.</a>
1
+ The `table_header` subcomponent creates `<th>` elements and optionally accepts:
2
+
3
+ * `colspan` (number) for setting column span
4
+ * `sort_menu` accepts sort options as an array of `item` objects.
5
+ presence of `sort_menu` enables the sort link within the header
6
+ * `sort_dropdown` (boolean) optionally declares that (true) clicking a header's sort link opens a dropdown of sort options, or (false) each sort link click cycles through available sort_menu items in the order they are passed
7
+ * passing a valid `colspan` will render sort options within a dropdown by default, without requiring `sort_dropdown` explicitly. Alternatively, the default sort dropdown can be prevented on headers with `colspan` by setting `sort_dropdown: false`, which reverts the column to sorting to multi-click default (each click of the sort link cycles through the available sort_menu items in the order they are passed)
8
+ * `id` (string) is required for headers that have a dropdown (for popover reference); otherwise they are optional