|
1 | 1 | ---
|
2 | 2 | group: ui-components-guide
|
3 |
| -title: Toolbar component |
| 3 | +title: ListingToolbar component |
4 | 4 | ---
|
5 | 5 |
|
6 |
| -The Toolbar component implements a container for the listing-related elements like paging, mass actions, filters, bookmarks. That is, it aggregates all elements that serve as tools and renders them at the top of the main table. |
| 6 | +The ListingToolbar component implements a container for the listing-related elements such as paging, mass actions, filters, and bookmarks. It aggregates all elements that serve as tools and renders them at the top of the main table. |
7 | 7 |
|
8 | 8 | ## Configuration options
|
9 | 9 |
|
10 |
| -<table> |
11 |
| - <tr> |
12 |
| - <th>Option</th> |
13 |
| - <th>Description</th> |
14 |
| - <th>Type</th> |
15 |
| - <th>Default</th> |
16 |
| - </tr> |
17 |
| - <tr> |
18 |
| - <td><code>sticky</code></td> |
19 |
| - <td>Whether the toolbar has a fixed position. When set to <code>true</code>, elements like paging, filters, and table headers stay in the viewport's area, no matter where the scroll position is.</td> |
20 |
| - <td>Boolean</td> |
21 |
| - <td><code>false</code></td> |
22 |
| - </tr> |
23 |
| - <tr> |
24 |
| - <td><code>stickyClass</code></td> |
25 |
| - <td>A list of additional CSS classes added to the root node of the <code>.html</code> template specified in <code>StickyTmpl</code>.</td> |
26 |
| - <td>{<br />[name:string]: boolean<br />}</td> |
27 |
| - <td>{<br /><code>'sticky-header': true</code><br />}</td> |
28 |
| - </tr> |
29 |
| - <tr> |
30 |
| - <td><code>stickyTmpl</code></td> |
31 |
| - <td>Path to the toolbar's template for the fixed position.</td> |
32 |
| - <td>String</td> |
33 |
| - <td><code>ui/grid/sticky/sticky</code></td> |
34 |
| - </tr> |
35 |
| - <tr> |
36 |
| - <td><code>template</code></td> |
37 |
| - <td>Path to the component’s <code>.html</code> template.</td> |
38 |
| - <td>String</td> |
39 |
| - <td><code>ui/grid/toolbar</code></td> |
40 |
| - </tr> |
41 |
| -</table> |
| 10 | +| Option | Description | Type | Default | |
| 11 | +| ------- | ------- | ------- | ------------ | |
| 12 | +| `sticky` | Whether the toolbar has a fixed position. When set to `true`, elements like paging, filters, and table headers stay in the viewport's area, no matter where the scroll position is. | `Boolean` | `false` | |
| 13 | +| `stickyClass` | A list of additional CSS classes added to the root node of the `.html` template specified in `StickyTmpl`. | {<br />[name:string]: boolean<br />} | {<br />`'sticky-header': true`<br />} | |
| 14 | +| `stickyTmpl` | Path to the toolbar's template for the fixed position. | `String` | `ui/grid/sticky/sticky` | |
| 15 | +| `template` | Path to the component’s `.html` template. | `String` | `ui/grid/toolbar` | |
| 16 | + |
| 17 | +## Examples |
| 18 | + |
| 19 | +### Integrate the ListingToolbar component with the Listing component |
| 20 | + |
| 21 | +In the following example, we group the following components: |
| 22 | + |
| 23 | +- Bookmark |
| 24 | +- ColumnsControls |
| 25 | +- FilterSearch |
| 26 | +- Filters |
| 27 | +- Mass Actions |
| 28 | +- Paging |
| 29 | + |
| 30 | +```xml |
| 31 | +<listingToolbar name="listing_top"> |
| 32 | + <settings> |
| 33 | + <sticky>true</sticky> |
| 34 | + </settings> |
| 35 | + <bookmark name="bookmarks"/> |
| 36 | + <columnsControls name="columns_controls"/> |
| 37 | + <filterSearch name="fulltext"/> |
| 38 | + <filters name="listing_filters"> |
| 39 | + ... |
| 40 | + </filters> |
| 41 | + <massaction name="listing_massaction"> |
| 42 | + ... |
| 43 | + </massaction> |
| 44 | + <paging name="listing_paging"/> |
| 45 | +</listingToolbar> |
| 46 | +``` |
| 47 | + |
| 48 | +#### Result |
| 49 | + |
| 50 | + |
42 | 51 |
|
43 | 52 | ## Source files
|
44 | 53 |
|
|
0 commit comments