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
Copy file name to clipboardExpand all lines: README.md
+62-1Lines changed: 62 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,67 @@ You can use the [`AutoResizer`](https://autodesk.github.io/react-base-table/api/
38
38
39
39
_You have to polyfil `Array.prototype.findIndex` to make it works on IE_
40
40
41
+
## Advance
42
+
43
+
BaseTable is designed to be the base component to build your own complex table component
44
+
45
+
### Styling
46
+
47
+
The simplest way is overriding the default styles (assuming you are using `scss`)
48
+
49
+
```scss
50
+
// override default variables for BaseTable
51
+
$table-prefix: AdvanceTable;
52
+
53
+
$table-font-size: $bim-font-size-small;
54
+
$table-border-radius: 4px;
55
+
$table-padding-left: 15px;
56
+
$table-padding-right: 15px;
57
+
$column-padding: 7.5px;
58
+
...
59
+
$show-frozen-rows-shadow: false;
60
+
$show-frozen-columns-shadow: true;
61
+
62
+
@import'~react-base-table/es/_BaseTable.scss';
63
+
64
+
.#{$table-prefix} {
65
+
&:not(.#{$table-prefix}--show-left-shadow) {
66
+
.#{$table-prefix}__table-frozen-left {
67
+
box-shadow: none;
68
+
}
69
+
}
70
+
71
+
&:not(.#{$table-prefix}--show-right-shadow) {
72
+
.#{$table-prefix}__table-frozen-right {
73
+
box-shadow: none;
74
+
}
75
+
}
76
+
77
+
...
78
+
}
79
+
```
80
+
81
+
You can write your own styles from scratch or use CSS-in-JS solutions to achieve that
82
+
83
+
### Custom components
84
+
85
+
```jsx
86
+
<BaseTable
87
+
classPrefix="AdvanceTable"
88
+
components={{
89
+
TableCell: AdvanceTableCell,
90
+
TableHeaderCell: AdvanceTableHeaderCell,
91
+
ExpandIcon: AdvanceExpandIcon,
92
+
SortIndicator: AdvanceSortIndicator,
93
+
}}
94
+
...
95
+
/>
96
+
```
97
+
98
+
### Custom renderers & props
99
+
100
+
There are a lot of highly flexible props like `xxxRenderer` and `xxxProps` for you to build your own table component, please check the [api](https://autodesk.github.io/react-base-table/api) and [examples](https://autodesk.github.io/react-base-table/examples) for more details
101
+
41
102
## Contributing
42
103
43
-
Please check [guidelines](CONTRIBUTING.md) for more details.
104
+
Please check [guidelines](CONTRIBUTING.md) for more details
BaseTable is designed to be the base component to build your own complex table component
4
+
5
+
### Styling
6
+
7
+
The simplest way is overriding the default styles (assuming you are using `scss`)
8
+
9
+
```scss
10
+
// override default variables for BaseTable
11
+
$table-prefix: AdvanceTable;
12
+
13
+
$table-font-size: $bim-font-size-small;
14
+
$table-border-radius: 4px;
15
+
$table-padding-left: 15px;
16
+
$table-padding-right: 15px;
17
+
$column-padding: 7.5px;
18
+
...
19
+
$show-frozen-rows-shadow: false;
20
+
$show-frozen-columns-shadow: true;
21
+
22
+
@import'~react-base-table/es/_BaseTable.scss';
23
+
24
+
.#{$table-prefix} {
25
+
&:not(.#{$table-prefix}--show-left-shadow) {
26
+
.#{$table-prefix}__table-frozen-left {
27
+
box-shadow: none;
28
+
}
29
+
}
30
+
31
+
&:not(.#{$table-prefix}--show-right-shadow) {
32
+
.#{$table-prefix}__table-frozen-right {
33
+
box-shadow: none;
34
+
}
35
+
}
36
+
37
+
...
38
+
}
39
+
```
40
+
41
+
You can write your own styles from scratch or use CSS-in-JS solutions to achieve that
42
+
43
+
### Custom components
44
+
45
+
```jsx
46
+
<BaseTable
47
+
classPrefix="AdvanceTable"
48
+
components={{
49
+
TableCell: AdvanceTableCell,
50
+
TableHeaderCell: AdvanceTableHeaderCell,
51
+
ExpandIcon: AdvanceExpandIcon,
52
+
SortIndicator: AdvanceSortIndicator,
53
+
}}
54
+
...
55
+
/>
56
+
```
57
+
58
+
### Custom renderers & props
59
+
60
+
There are a lot of highly flexible props like `xxxRenderer` and `xxxProps` for you to build your own table component, please check the [api](https://autodesk.github.io/react-base-table/api) and [examples](https://autodesk.github.io/react-base-table/examples) for more details
0 commit comments