You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 2, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/docs/content/en_us/master-details.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,14 @@ fdRelatedComponents:
4
4
---
5
5
# Master Details
6
6
7
+
::: tip CSS NEEDED & BETA NOTICE
8
+
9
+
The Master Details-related components require some additional CSS that is not part of Fundamental Styles. If you want to use the master detail-related components you have to inlude the extra **Fundamental Vue CSS** file. It is part of the NPM package in `dist`. It is also available at [https://unpkg.com/fundamental-vue](https://unpkg.com/fundamental-vue@latest/dist/FundamentalVue.umd.css)
10
+
11
+
The Master Details-related components are in **beta**.
12
+
13
+
:::
14
+
7
15
This component provides a standardized master-details layout. The master section contains a list, whereas the details section's content is completely up to the developer. The `fd-master-details` component, exposes multiple props and slots allowing the consumer to customize the layout.
8
16
9
17
@@ -21,8 +29,8 @@ placed inside an `fd-modal` allowing the `master` section to take up all the ava
21
29
22
30
## Simple example
23
31
24
-
The simplest way to use it, would be by passing the `master-items` prop and populating the `details-content` slot (since it is empty by default).
25
-
32
+
The simplest way to use it, would be by passing the `master-items` prop and populating the `details-content` slot (since it is empty by default).
33
+
26
34
<d-examplename="default">
27
35
</d-example>
28
36
@@ -31,13 +39,13 @@ The simplest way to use it, would be by passing the `master-items` prop and popu
31
39
The component exposes `master-width` and `gap` props to control the with of the master column and that of the gap between the 2 columns. By default, the `master-width` is set to 50% and the `gap` is set to 0. The details column will always automatically take up the remaining space.
32
40
You can pass the size that you want is either pixels or percentage, e.g: '50%', '20px'...
33
41
34
-
Use the sliders in the example below to see how the layout changes when changing the aforementioned props
42
+
Use the sliders in the example below to see how the layout changes when changing the aforementioned props
35
43
<d-examplename="layout">
36
44
</d-example>
37
45
38
46
## Using a Virtualized List
39
47
40
-
As we have mentioned before, the component can either user `fd-list-group` or `fd-virtualized-list` under the hood. To use the virtualized list, you need to set the `use-virtualized-list` prop to `true`. You can then pass an object that contains all the props that you would usually pass to the `fd-virtualized-list`. The `fd-master-details` uses a default configuration object which means you can choose to only pass the properties that you wish to override. The defaults are:
48
+
As we have mentioned before, the component can either user `fd-list-group` or `fd-virtualized-list` under the hood. To use the virtualized list, you need to set the `use-virtualized-list` prop to `true`. You can then pass an object that contains all the props that you would usually pass to the `fd-virtualized-list`. The `fd-master-details` uses a default configuration object which means you can choose to only pass the properties that you wish to override. The defaults are:
41
49
42
50
```js
43
51
defaultVirtualizedListConfig: {
@@ -61,7 +69,7 @@ defaultVirtualizedListConfig: {
61
69
62
70
## Slots
63
71
64
-
This component exposes multiple slots allowing you to customize the contents of the sections' title and content. You can see how the slots are positioned in the image below.
72
+
This component exposes multiple slots allowing you to customize the contents of the sections' title and content. You can see how the slots are positioned in the image below.
@@ -75,7 +83,7 @@ Below is an example making full use of all the available slots (it also simulate
75
83
In order to ensure a more responsive design, the component exposes `auto-open-modal`, `mobile-modal-styles` and `mobile-breakpoints` props allowing the developer to control when should the `details` switch to an `fd-modal` and how should the modal look like. By default, the modal will be fullscreen and will be triggered on the `Breakpoints.XSmall` breakpoint.
76
84
77
85
Below is an example that makes use of these props to customize the mobile behavior of the component.
0 commit comments