@patternfly/react-table 4.91.8 → 4.91.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/esm/components/TableComposable/Tr.d.ts +3 -1
- package/dist/esm/components/TableComposable/Tr.d.ts.map +1 -1
- package/dist/esm/components/TableComposable/Tr.js.map +1 -1
- package/dist/js/components/TableComposable/Tr.d.ts +3 -1
- package/dist/js/components/TableComposable/Tr.d.ts.map +1 -1
- package/dist/js/components/TableComposable/Tr.js.map +1 -1
- package/package.json +6 -6
- package/src/components/TableComposable/Tr.tsx +3 -1
- package/src/components/TableComposable/examples/ComposableTable.md +2 -0
- package/src/components/TableComposable/examples/ComposableTableCompoundExpandable.tsx +20 -7
- package/src/components/TableComposable/examples/ComposableTableExpandable.tsx +10 -6
- package/src/components/TableComposable/examples/ComposableTableNestedExpandable.tsx +4 -2
- package/src/components/TableComposable/examples/ComposableTableNestedTableExpandable.tsx +1 -1
- package/src/components/TableComposable/examples/ComposableTableStripedExpandable.tsx +5 -5
- package/src/components/TableComposable/examples/ComposableTableTree.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 4.91.11 (2022-06-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **Table:** update expandable examples to set column widths ([#7513](https://github.com/patternfly/patternfly-react/issues/7513)) ([c2e1e61](https://github.com/patternfly/patternfly-react/commit/c2e1e618a6924bdbb2b1e8e7ad94553615196fb2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 4.91.10 (2022-06-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **Topology:** Fix for group position when it has no children ([#7573](https://github.com/patternfly/patternfly-react/issues/7573)) ([04e435e](https://github.com/patternfly/patternfly-react/commit/04e435ebc87ad7d1c687db95ee8ef8beffae514d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 4.91.9 (2022-06-16)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## 4.91.8 (2022-06-16)
|
|
7
37
|
|
|
8
38
|
|
|
@@ -9,7 +9,9 @@ export interface TrProps extends React.HTMLProps<HTMLTableRowElement>, OUIAProps
|
|
|
9
9
|
innerRef?: React.Ref<any>;
|
|
10
10
|
/** Flag indicating the Tr is hidden */
|
|
11
11
|
isHidden?: boolean;
|
|
12
|
-
/** Only applicable to Tr within the Tbody: Makes the row expandable and determines if it's expanded or not
|
|
12
|
+
/** Only applicable to Tr within the Tbody: Makes the row expandable and determines if it's expanded or not.
|
|
13
|
+
* To prevent column widths from responding automatically when expandable rows are toggled, the width prop must also be passed into either the th or td component
|
|
14
|
+
*/
|
|
13
15
|
isExpanded?: boolean;
|
|
14
16
|
/** Only applicable to Tr within the Tbody: Whether the row is editable */
|
|
15
17
|
isEditable?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr.d.ts","sourceRoot":"","sources":["../../../../src/components/TableComposable/Tr.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAgB,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMjE,MAAM,WAAW,OAAQ,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,SAAS;IAC9E,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAg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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr.js","sourceRoot":"","sources":["../../../../src/components/TableComposable/Tr.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAa,MAAM,wBAAwB,CAAC;AACjE,OAAO,MAAM,MAAM,qDAAqD,CAAC;AACzE,OAAO,YAAY,MAAM,gEAAgE,CAAC;AAC1F,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Tr.js","sourceRoot":"","sources":["../../../../src/components/TableComposable/Tr.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAa,MAAM,wBAAwB,CAAC;AACjE,OAAO,MAAM,MAAM,qDAAqD,CAAC;AACzE,OAAO,YAAY,MAAM,gEAAgE,CAAC;AAC1F,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AA+B3D,MAAM,MAAM,GAAqC,CAAC,EAiBxC,EAAE,EAAE;QAjBoC,EAChD,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,KAAK,EACnB,aAAa,GAAG,KAAK,EACrB,SAAS,GAAG,KAAK,EACjB,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,IAAI,EACf,WAAW,GAAG,KAAK,EACnB,UAAU,EACV,YAAY,EACZ,YAAY,EAAE,eAAe,OAErB,EADL,KAAK,cAhBwC,2MAiBjD,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CA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AAC,SAAS,EACzC,aAAa,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,EAC1C,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,OAAO,EACrC,WAAW,IAAI,MAAM,CAAC,SAAS,CAAC,oBAAoB,CACrD,EACD,MAAM,EAAE,WAAW,IACf,CAAC,WAAW,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,kBACxB,SAAS,EACrB,GAAG,EAAE,QAAQ,IACT,CAAC,UAAU,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAClD,SAAS,EACT,KAAK,GAER,QAAQ,CACN,CACJ,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAc,EAAE,GAAmC,EAAE,EAAE,CAAC,CAC1F,oBAAC,MAAM,oBAAK,KAAK,IAAE,QAAQ,EAAE,GAAG,IAAI,CACrC,CAAC,CAAC;AACH,EAAE,CAAC,WAAW,GAAG,IAAI,CAAC"}
|
|
@@ -9,7 +9,9 @@ export interface TrProps extends React.HTMLProps<HTMLTableRowElement>, OUIAProps
|
|
|
9
9
|
innerRef?: React.Ref<any>;
|
|
10
10
|
/** Flag indicating the Tr is hidden */
|
|
11
11
|
isHidden?: boolean;
|
|
12
|
-
/** Only applicable to Tr within the Tbody: Makes the row expandable and determines if it's expanded or not
|
|
12
|
+
/** Only applicable to Tr within the Tbody: Makes the row expandable and determines if it's expanded or not.
|
|
13
|
+
* To prevent column widths from responding automatically when expandable rows are toggled, the width prop must also be passed into either the th or td component
|
|
14
|
+
*/
|
|
13
15
|
isExpanded?: boolean;
|
|
14
16
|
/** Only applicable to Tr within the Tbody: Whether the row is editable */
|
|
15
17
|
isEditable?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr.d.ts","sourceRoot":"","sources":["../../../../src/components/TableComposable/Tr.tsx"],"names":[],"mappings":"A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UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACtE,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA4ED,eAAO,MAAM,EAAE,y+LAEb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr.js","sourceRoot":"","sources":["../../../../src/components/TableComposable/Tr.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uDAAiE;AACjE,wGAAyE;AACzE,yHAA0F;AAC1F,2DAA+C;AAC/C,uDAA2D;
|
|
1
|
+
{"version":3,"file":"Tr.js","sourceRoot":"","sources":["../../../../src/components/TableComposable/Tr.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uDAAiE;AACjE,wGAAyE;AACzE,yHAA0F;AAC1F,2DAA+C;AAC/C,uDAA2D;AA+B3D,MAAM,MAAM,GAAqC,CAAC,EAiBxC,EAAE,EAAE;QAjBoC,EAChD,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,KAAK,EACnB,aAAa,GAAG,KAAK,EACrB,SAAS,GAAG,KAAK,EACjB,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,IAAI,EACf,WAAW,GAAG,KAAK,EACnB,UAAU,EACV,YAAY,EACZ,YAAY,EAAE,eAAe,OAErB,EADL,KAAK,sBAhBwC,2MAiBjD,CADS;IAER,MAAM,SAAS,GAAG,yBAAY,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAqB,EAAE,CAAC,CAAC;IAEzF,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,IAAI,UA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OAAO,EACrC,WAAW,IAAI,eAAM,CAAC,SAAS,CAAC,oBAAoB,CACrD,EACD,MAAM,EAAE,WAAW,IACf,CAAC,WAAW,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,kBACxB,SAAS,EACrB,GAAG,EAAE,QAAQ,IACT,CAAC,UAAU,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAClD,SAAS,EACT,KAAK,GAER,QAAQ,CACN,CACJ,CACJ,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAc,EAAE,GAAmC,EAAE,EAAE,CAAC,CAC1F,oBAAC,MAAM,oBAAK,KAAK,IAAE,QAAQ,EAAE,GAAG,IAAI,CACrC,CAAC,CAAC;AACH,UAAE,CAAC,WAAW,GAAG,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "4.91.
|
|
3
|
+
"version": "4.91.11",
|
|
4
4
|
"description": "This library provides a set of React table components for use with the PatternFly 4",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"clean": "rimraf dist"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@patternfly/react-core": "^4.222.
|
|
35
|
-
"@patternfly/react-icons": "^4.73.
|
|
36
|
-
"@patternfly/react-styles": "^4.72.
|
|
37
|
-
"@patternfly/react-tokens": "^4.74.
|
|
34
|
+
"@patternfly/react-core": "^4.222.11",
|
|
35
|
+
"@patternfly/react-icons": "^4.73.11",
|
|
36
|
+
"@patternfly/react-styles": "^4.72.11",
|
|
37
|
+
"@patternfly/react-tokens": "^4.74.11",
|
|
38
38
|
"lodash": "^4.17.19",
|
|
39
39
|
"tslib": "^2.0.0"
|
|
40
40
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": "^16.8.0 || ^17.0.0",
|
|
47
47
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "f1a199ba0c0555f0e78faf42e7d25fa5e6510871"
|
|
50
50
|
}
|
|
@@ -14,7 +14,9 @@ export interface TrProps extends React.HTMLProps<HTMLTableRowElement>, OUIAProps
|
|
|
14
14
|
innerRef?: React.Ref<any>;
|
|
15
15
|
/** Flag indicating the Tr is hidden */
|
|
16
16
|
isHidden?: boolean;
|
|
17
|
-
/** Only applicable to Tr within the Tbody: Makes the row expandable and determines if it's expanded or not
|
|
17
|
+
/** Only applicable to Tr within the Tbody: Makes the row expandable and determines if it's expanded or not.
|
|
18
|
+
* To prevent column widths from responding automatically when expandable rows are toggled, the width prop must also be passed into either the th or td component
|
|
19
|
+
*/
|
|
18
20
|
isExpanded?: boolean;
|
|
19
21
|
/** Only applicable to Tr within the Tbody: Whether the row is editable */
|
|
20
22
|
isEditable?: boolean;
|
|
@@ -194,6 +194,8 @@ type OnCollapse = (
|
|
|
194
194
|
) => void;
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
+
Note: Table column widths will respond automatically when toggling expanded rows. To retain column widths between expanded and collapsed states, column header and/or data cell widths must be set.
|
|
198
|
+
|
|
197
199
|
```ts file="ComposableTableExpandable.tsx"
|
|
198
200
|
```
|
|
199
201
|
|
|
@@ -67,20 +67,26 @@ export const ComposableTableCompoundExpandable: React.FunctionComponent = () =>
|
|
|
67
67
|
return (
|
|
68
68
|
<Tbody key={repo.name} isExpanded={isRowExpanded}>
|
|
69
69
|
<Tr>
|
|
70
|
-
<Td dataLabel={columnNames.name} component="th">
|
|
70
|
+
<Td width={25} dataLabel={columnNames.name} component="th">
|
|
71
71
|
<a href="#">{repo.name}</a>
|
|
72
72
|
</Td>
|
|
73
|
-
<Td dataLabel={columnNames.branches} compoundExpand={compoundExpandParams(repo, 'branches')}>
|
|
73
|
+
<Td width={10} dataLabel={columnNames.branches} compoundExpand={compoundExpandParams(repo, 'branches')}>
|
|
74
74
|
<CodeBranchIcon key="icon" /> {repo.branches}
|
|
75
75
|
</Td>
|
|
76
|
-
<Td dataLabel={columnNames.prs} compoundExpand={compoundExpandParams(repo, 'prs')}>
|
|
76
|
+
<Td width={10} dataLabel={columnNames.prs} compoundExpand={compoundExpandParams(repo, 'prs')}>
|
|
77
77
|
<CodeIcon key="icon" /> {repo.prs}
|
|
78
78
|
</Td>
|
|
79
|
-
<Td
|
|
79
|
+
<Td
|
|
80
|
+
width={10}
|
|
81
|
+
dataLabel={columnNames.workspaces}
|
|
82
|
+
compoundExpand={compoundExpandParams(repo, 'workspaces')}
|
|
83
|
+
>
|
|
80
84
|
<CubeIcon key="icon" /> {repo.workspaces}
|
|
81
85
|
</Td>
|
|
82
|
-
<Td dataLabel={columnNames.lastCommit}>
|
|
83
|
-
|
|
86
|
+
<Td width={15} dataLabel={columnNames.lastCommit}>
|
|
87
|
+
{repo.lastCommit}
|
|
88
|
+
</Td>
|
|
89
|
+
<Td width={30}>
|
|
84
90
|
<a href="#">Open in GitHub</a>
|
|
85
91
|
</Td>
|
|
86
92
|
</Tr>
|
|
@@ -89,7 +95,14 @@ export const ComposableTableCompoundExpandable: React.FunctionComponent = () =>
|
|
|
89
95
|
<Td dataLabel={columnNames[expandedCellKey]} noPadding colSpan={6}>
|
|
90
96
|
<ExpandableRowContent>
|
|
91
97
|
<div className="pf-u-m-md">
|
|
92
|
-
|
|
98
|
+
Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem
|
|
99
|
+
ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum
|
|
100
|
+
sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit
|
|
101
|
+
dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor.
|
|
102
|
+
Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem
|
|
103
|
+
ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum
|
|
104
|
+
sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit
|
|
105
|
+
dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor.
|
|
93
106
|
</div>
|
|
94
107
|
</ExpandableRowContent>
|
|
95
108
|
</Td>
|
|
@@ -36,7 +36,11 @@ export const ComposableTableExpandable: React.FunctionComponent = () => {
|
|
|
36
36
|
prs: 'b',
|
|
37
37
|
workspaces: 'four',
|
|
38
38
|
lastCommit: 'five',
|
|
39
|
-
details: {
|
|
39
|
+
details: {
|
|
40
|
+
detailFormat: 1,
|
|
41
|
+
detail1:
|
|
42
|
+
'Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. '
|
|
43
|
+
}
|
|
40
44
|
},
|
|
41
45
|
{
|
|
42
46
|
name: 'parent 3',
|
|
@@ -117,11 +121,11 @@ export const ComposableTableExpandable: React.FunctionComponent = () => {
|
|
|
117
121
|
<Thead>
|
|
118
122
|
<Tr>
|
|
119
123
|
<Th />
|
|
120
|
-
<Th>{columnNames.name}</Th>
|
|
121
|
-
<Th>{columnNames.branches}</Th>
|
|
122
|
-
<Th>{columnNames.prs}</Th>
|
|
123
|
-
<Th>{columnNames.workspaces}</Th>
|
|
124
|
-
<Th>{columnNames.lastCommit}</Th>
|
|
124
|
+
<Th width={25}>{columnNames.name}</Th>
|
|
125
|
+
<Th width={10}>{columnNames.branches}</Th>
|
|
126
|
+
<Th width={15}>{columnNames.prs}</Th>
|
|
127
|
+
<Th width={30}>{columnNames.workspaces}</Th>
|
|
128
|
+
<Th width={10}>{columnNames.lastCommit}</Th>
|
|
125
129
|
</Tr>
|
|
126
130
|
</Thead>
|
|
127
131
|
{repositories.map((repo, rowIndex) => {
|
|
@@ -74,13 +74,15 @@ export const ComposableTableNestedExpandable: React.FunctionComponent = () => {
|
|
|
74
74
|
<Thead hasNestedHeader>
|
|
75
75
|
<Tr>
|
|
76
76
|
<Th rowSpan={2} />
|
|
77
|
-
<Th rowSpan={2} hasRightBorder>
|
|
77
|
+
<Th width={35} rowSpan={2} hasRightBorder>
|
|
78
78
|
{columnNames.team}
|
|
79
79
|
</Th>
|
|
80
80
|
<Th colSpan={3} hasRightBorder>
|
|
81
81
|
{columnNames.members}
|
|
82
82
|
</Th>
|
|
83
|
-
<Th rowSpan={2}>
|
|
83
|
+
<Th width={25} rowSpan={2}>
|
|
84
|
+
{columnNames.contact}
|
|
85
|
+
</Th>
|
|
84
86
|
</Tr>
|
|
85
87
|
<Tr resetOffset>
|
|
86
88
|
<Th isSubheader>{columnNames.lead}</Th>
|
|
@@ -142,7 +142,7 @@ export const ComposableTableExpandable: React.FunctionComponent = () => {
|
|
|
142
142
|
<Thead>
|
|
143
143
|
<Tr>
|
|
144
144
|
<Td />
|
|
145
|
-
<Th>{columnNames.name}</Th>
|
|
145
|
+
<Th width={20}>{columnNames.name}</Th>
|
|
146
146
|
<Th>{columnNames.branches}</Th>
|
|
147
147
|
<Th>{columnNames.prs}</Th>
|
|
148
148
|
<Th>{columnNames.link}</Th>
|
|
@@ -121,11 +121,11 @@ export const ComposableTableStripedExpandable: React.FunctionComponent = () => {
|
|
|
121
121
|
<Thead>
|
|
122
122
|
<Tr>
|
|
123
123
|
<Th />
|
|
124
|
-
<Th>{columnNames.name}</Th>
|
|
125
|
-
<Th>{columnNames.branches}</Th>
|
|
126
|
-
<Th>{columnNames.prs}</Th>
|
|
127
|
-
<Th>{columnNames.workspaces}</Th>
|
|
128
|
-
<Th>{columnNames.lastCommit}</Th>
|
|
124
|
+
<Th width={25}>{columnNames.name}</Th>
|
|
125
|
+
<Th width={10}>{columnNames.branches}</Th>
|
|
126
|
+
<Th width={15}>{columnNames.prs}</Th>
|
|
127
|
+
<Th width={30}>{columnNames.workspaces}</Th>
|
|
128
|
+
<Th width={10}>{columnNames.lastCommit}</Th>
|
|
129
129
|
</Tr>
|
|
130
130
|
</Thead>
|
|
131
131
|
{repositories.map((repo, rowIndex) => {
|
|
@@ -187,7 +187,7 @@ export const ComposableTableTree: React.FunctionComponent = () => {
|
|
|
187
187
|
<TableComposable isTreeTable aria-label="Tree table">
|
|
188
188
|
<Thead>
|
|
189
189
|
<Tr>
|
|
190
|
-
<Th>{columnNames.name}</Th>
|
|
190
|
+
<Th width={40}>{columnNames.name}</Th>
|
|
191
191
|
<Th>{columnNames.branches}</Th>
|
|
192
192
|
<Th>{columnNames.prs}</Th>
|
|
193
193
|
<Th>{columnNames.workspaces}</Th>
|