Skip to content

Commit 502c64d

Browse files
authored
Merge pull request #72 from jbetancur/fix-subheader-spacing
fix subheader padding
2 parents 404d9b4 + 2dbd7c8 commit 502c64d

4 files changed

Lines changed: 9 additions & 16 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-data-table-component",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "A declarative react based data table",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",

src/DataTable/TableSubheader.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ const SubheaderWrapper = styled.header`
1313
display: flex;
1414
flex: 1 1 auto;
1515
align-items: center;
16-
padding: 0 16px 0 24px;
17-
min-height: 48px;
16+
padding: 0 16px 8px 24px;
1817
width: 100%;
1918
background-color: ${props => props.theme.title.backgroundColor};
2019
justify-content: ${props => alignMap[props.align]};

src/DataTable/__tests__/__snapshots__/TableSubHeader.test..js.snap

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ exports[`<TableSubheader defaults should render correctly 1`] = `
1414
-webkit-box-align: center;
1515
-ms-flex-align: center;
1616
align-items: center;
17-
padding: 0 16px 0 24px;
18-
min-height: 48px;
17+
padding: 0 16px 8px 24px;
1918
width: 100%;
2019
background-color: transparent;
2120
-webkit-box-pack: end;
@@ -46,8 +45,7 @@ exports[`<TableSubheader with component should render correctly 1`] = `
4645
-webkit-box-align: center;
4746
-ms-flex-align: center;
4847
align-items: center;
49-
padding: 0 16px 0 24px;
50-
min-height: 48px;
48+
padding: 0 16px 8px 24px;
5149
width: 100%;
5250
background-color: transparent;
5351
-webkit-box-pack: end;
@@ -80,8 +78,7 @@ exports[`<TableSubheader with component should render correctly with center alig
8078
-webkit-box-align: center;
8179
-ms-flex-align: center;
8280
align-items: center;
83-
padding: 0 16px 0 24px;
84-
min-height: 48px;
81+
padding: 0 16px 8px 24px;
8582
width: 100%;
8683
background-color: transparent;
8784
-webkit-box-pack: center;
@@ -114,8 +111,7 @@ exports[`<TableSubheader with component should render correctly with left align
114111
-webkit-box-align: center;
115112
-ms-flex-align: center;
116113
align-items: center;
117-
padding: 0 16px 0 24px;
118-
min-height: 48px;
114+
padding: 0 16px 8px 24px;
119115
width: 100%;
120116
background-color: transparent;
121117
-webkit-box-pack: start;
@@ -148,8 +144,7 @@ exports[`<TableSubheader with component should render correctly with right align
148144
-webkit-box-align: center;
149145
-ms-flex-align: center;
150146
align-items: center;
151-
padding: 0 16px 0 24px;
152-
min-height: 48px;
147+
padding: 0 16px 8px 24px;
153148
width: 100%;
154149
background-color: transparent;
155150
-webkit-box-pack: end;
@@ -182,8 +177,7 @@ exports[`<TableSubheader with component should render when wrap is false 1`] = `
182177
-webkit-box-align: center;
183178
-ms-flex-align: center;
184179
align-items: center;
185-
padding: 0 16px 0 24px;
186-
min-height: 48px;
180+
padding: 0 16px 8px 24px;
187181
width: 100%;
188182
background-color: transparent;
189183
-webkit-box-pack: end;

src/DataTable/propTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const defaultProps = {
118118
noHeader: false,
119119
subHeader: false,
120120
subHeaderAlign: 'right',
121-
subHeaderWrap: false,
121+
subHeaderWrap: true,
122122
subHeaderComponent: [],
123123
onRowClicked: null,
124124
fixedHeader: false,

0 commit comments

Comments
 (0)