Skip to content

Commit 3ddd5bf

Browse files
author
Slavomír Žiak
committed
spacing, code formatting
1 parent 102ea5b commit 3ddd5bf

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

json-viewer/src/component/App.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,18 @@ export default class App extends React.Component {
6767
<div style={{flexGrowL:1}}>
6868
<input type="file" rows="50" cols="100" onChange={(e) => readSingleFile(e, this.handleNewJson)} />
6969

70-
<Grid container spacing={3}>
70+
<Grid container spacing={0}>
7171
{this.state.headerFull.map(header => {
7272
return (
73-
<Grid item xs={3}>
74-
<FormControlLabel control={
75-
<Checkbox
76-
checked={this.state.header.includes(header)}
77-
onChange={() => this.toggleHeader(header)}
78-
inputProps={{ 'aria-label': header }} /> }
79-
label={header}
80-
/>
73+
<Grid item xs={2}>
74+
<FormControlLabel control={
75+
<Checkbox
76+
checked={this.state.header.includes(header)}
77+
onChange={() => this.toggleHeader(header)}
78+
inputProps={{ 'aria-label': header }} />
79+
}
80+
label={header}
81+
/>
8182
</Grid>
8283
);
8384
})}

json-viewer/src/component/DataTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function DataTable({header, data}) {
77

88
const columns = header.map(h => { return { field: h, headerName: h, sortable: true, flex: 1};});
99

10-
columns.splice(0, 0, {field: 'index', headerName: '#', flex: 1})
10+
columns.splice(0, 0, {field: 'index', headerName: '#'})
1111

1212
const rows = data.map((item, index) => {
1313
const row = header.reduce((acc, h) => { acc[h] = item[h]; return acc;}, {id: index});

0 commit comments

Comments
 (0)