mirror of
https://github.com/gosticks/react-table.git
synced 2025-10-16 11:55:36 +00:00
Fix javascript warning from yarn test. Compile storybook and docs.
This commit is contained in:
parent
590afb3e61
commit
d43d316eed
@ -16,7 +16,7 @@
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<div id="error-display"></div>
|
||||
<script src="static/preview.742092f25ec9b6802477.bundle.js"></script>
|
||||
<script src="static/preview.ea1bdf726a82703c8f6f.bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
</head>
|
||||
<body style="margin: 0;">
|
||||
<div id="root"></div>
|
||||
<script src="static/manager.1e44a83b81ae02b691ef.bundle.js"></script>
|
||||
<script src="static/manager.064c8fe6b78907f0a142.bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
docs/static/manager.064c8fe6b78907f0a142.bundle.js.map
vendored
Normal file
1
docs/static/manager.064c8fe6b78907f0a142.bundle.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"static/manager.064c8fe6b78907f0a142.bundle.js","sources":["webpack:///static/manager.064c8fe6b78907f0a142.bundle.js"],"mappings":"AAAA;AAkuDA;AA84DA;AAy8DA;AA00DA;AAsyEA;AA89CA;AA+rDA;AAsiDA;AAg6DA;AA2nDA;AA++CA;AAkvDA;AAsnEA;AA2oDA;AAivCA;AA+nDA;AAkpDA;AA6lEA;AAs4DA;AAquDA;AA+pDA;AAqxDA;AAsrDA;AA4yDA;AA88GA;AAj6CA;AAopGA;AAsuFA;AA+zEA;AAtMA;AAizEA","sourceRoot":""}
|
||||
@ -1 +0,0 @@
|
||||
{"version":3,"file":"static/manager.1e44a83b81ae02b691ef.bundle.js","sources":["webpack:///static/manager.1e44a83b81ae02b691ef.bundle.js"],"mappings":"AAAA;AAkuDA;AA84DA;AA28DA;AA00DA;AAsyEA;AA89CA;AA+rDA;AAsiDA;AAg6DA;AA2nDA;AA++CA;AAkvDA;AAsnEA;AA2oDA;AAivCA;AA+nDA;AAkpDA;AA6lEA;AAs4DA;AAquDA;AA+pDA;AAqxDA;AAsrDA;AA2yDA;AA88GA;AAj6CA;AAopGA;AAsuFA;AA+zEA;AAtMA;AAizEA","sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"file":"static/preview.742092f25ec9b6802477.bundle.js","sources":["webpack:///static/preview.742092f25ec9b6802477.bundle.js"],"mappings":"AAAA;AAkuDA;AAo8CA;AA8uGA;AA++EA;AAi9NA;AAo5GA;AAmvDA;AAmgEA;AA4xDA;AAigEA;AAmjDA;AA4sDA;AAk8CA;AAu/DA;AA8lDA;AA09CA;AAqoDA;AAywEA;AAokDA;AAsvCA;AA2mDA;AA4tDA;AAqjEA;AAs2DA;AAmyDA;AAsnDA;AAk1EA;AAmjGA;AAiuDA;AA+2CA;AAq5BA;AA4zDA;AA26BA;AAuOA;AAw5EA","sourceRoot":""}
|
||||
37
docs/static/preview.ea1bdf726a82703c8f6f.bundle.js
vendored
Normal file
37
docs/static/preview.ea1bdf726a82703c8f6f.bundle.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
docs/static/preview.ea1bdf726a82703c8f6f.bundle.js.map
vendored
Normal file
1
docs/static/preview.ea1bdf726a82703c8f6f.bundle.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"static/preview.ea1bdf726a82703c8f6f.bundle.js","sources":["webpack:///static/preview.ea1bdf726a82703c8f6f.bundle.js"],"mappings":"AAAA;AAkuDA;AAo/DA;AAgrFA;AAmmFA;AA07OA;AAuwFA;AAwtDA;AA+jEA;AA4uDA;AAi8DA;AA+lDA;AA4yDA;AA28CA;AAw7DA;AAooDA;AA67CA;AAiqDA;AAynEA;AAwxDA;AA+rCA;AA+mDA;AA2lDA;AAkqEA;AAs2DA;AA2zDA;AAo4CA;AAksFA;AAmjGA;AAksDA;AA02CA;AAgoCA;AAm/CA;AA+4CA;AAsCA;AA+jFA","sourceRoot":""}
|
||||
@ -150,7 +150,7 @@ export default {
|
||||
{'-active': loading},
|
||||
className
|
||||
)}
|
||||
{...rest}
|
||||
{...rest}
|
||||
>
|
||||
<div className='-loading-inner'>
|
||||
{loadingText}
|
||||
|
||||
88
src/index.js
88
src/index.js
@ -413,27 +413,27 @@ export default React.createClass({
|
||||
|
||||
if (column.expander) {
|
||||
if (column.pivotColumns) {
|
||||
const pivotCols = [];
|
||||
const pivotCols = []
|
||||
for (let i = 0; i < column.pivotColumns.length; i++) {
|
||||
const col = column.pivotColumns[i];
|
||||
const col = column.pivotColumns[i]
|
||||
const filter = filtering.find(filter => filter.id == col.id)
|
||||
pivotCols.push(
|
||||
<span key={col.id}
|
||||
style={{display: 'flex', alignContent: 'flex-end', flex: 1}}>
|
||||
<input type="text"
|
||||
style={{
|
||||
flex: 1,
|
||||
width: 20,
|
||||
backgroundColor: i > 0 ? '#f3f3f3' : '#fff'
|
||||
}}
|
||||
value={filter ? filter.value : ""}
|
||||
disabled={i > 0}
|
||||
onChange={(event) => this.filterColumn(col, event)}
|
||||
/>
|
||||
</span>
|
||||
style={{display: 'flex', alignContent: 'flex-end', flex: 1}}>
|
||||
<input type='text'
|
||||
style={{
|
||||
flex: 1,
|
||||
width: 20,
|
||||
backgroundColor: i > 0 ? '#f3f3f3' : '#fff'
|
||||
}}
|
||||
value={filter ? filter.value : ''}
|
||||
disabled={i > 0}
|
||||
onChange={(event) => this.filterColumn(col, event)}
|
||||
/>
|
||||
</span>
|
||||
)
|
||||
if (i < column.pivotColumns.length - 1) {
|
||||
pivotCols.push(<ExpanderComponent key={col.id + "-" + i}/>)
|
||||
pivotCols.push(<ExpanderComponent key={col.id + '-' + i} />)
|
||||
}
|
||||
}
|
||||
return (
|
||||
@ -490,12 +490,12 @@ export default React.createClass({
|
||||
}}
|
||||
{...rest}
|
||||
>
|
||||
<input type="text"
|
||||
style={{
|
||||
width: `100%`,
|
||||
}}
|
||||
value={filter ? filter.value : ""}
|
||||
onChange={(event) => this.filterColumn(column, event)}
|
||||
<input type='text'
|
||||
style={{
|
||||
width: `100%`
|
||||
}}
|
||||
value={filter ? filter.value : ''}
|
||||
onChange={(event) => this.filterColumn(column, event)}
|
||||
/>
|
||||
</ThComponent>
|
||||
)
|
||||
@ -584,23 +584,23 @@ export default React.createClass({
|
||||
onClick={onTdClick}
|
||||
>
|
||||
{rowInfo.subRows ? (
|
||||
<span>
|
||||
<span>
|
||||
<ExpanderComponent
|
||||
isExpanded={isExpanded}
|
||||
/>
|
||||
{column && column.pivotRender ? (
|
||||
<PivotCell
|
||||
{...rowInfo}
|
||||
value={rowInfo.rowValues[pivotValKey]}
|
||||
/>
|
||||
) : <span>{row[pivotValKey]} ({rowInfo.subRows.length})</span>}
|
||||
{column && column.pivotRender ? (
|
||||
<PivotCell
|
||||
{...rowInfo}
|
||||
value={rowInfo.rowValues[pivotValKey]}
|
||||
/>
|
||||
) : <span>{row[pivotValKey]} ({rowInfo.subRows.length})</span>}
|
||||
</span>
|
||||
) : SubComponent ? (
|
||||
<span>
|
||||
<ExpanderComponent
|
||||
isExpanded={isExpanded}
|
||||
/>
|
||||
</span>
|
||||
<span>
|
||||
<ExpanderComponent
|
||||
isExpanded={isExpanded}
|
||||
/>
|
||||
</span>
|
||||
) : null}
|
||||
</TdComponent>
|
||||
)
|
||||
@ -876,17 +876,17 @@ export default React.createClass({
|
||||
{hasColumnFooter ? makeColumnFooters() : null}
|
||||
</TableComponent>
|
||||
{showPagination ? (
|
||||
<PaginationComponent
|
||||
{...resolvedState}
|
||||
pages={pages}
|
||||
canPrevious={canPrevious}
|
||||
canNext={canNext}
|
||||
onPageChange={this.onPageChange}
|
||||
onPageSizeChange={this.onPageSizeChange}
|
||||
className={paginationProps.className}
|
||||
style={paginationProps.style}
|
||||
{...paginationProps.rest}
|
||||
/>
|
||||
<PaginationComponent
|
||||
{...resolvedState}
|
||||
pages={pages}
|
||||
canPrevious={canPrevious}
|
||||
canNext={canNext}
|
||||
onPageChange={this.onPageChange}
|
||||
onPageSizeChange={this.onPageSizeChange}
|
||||
className={paginationProps.className}
|
||||
style={paginationProps.style}
|
||||
{...paginationProps.rest}
|
||||
/>
|
||||
) : null}
|
||||
{!pageRows.length && (
|
||||
<NoDataComponent
|
||||
|
||||
@ -193,14 +193,13 @@ export default {
|
||||
let groupedRows = Object.entries(
|
||||
_.groupBy(rows, keys[i]))
|
||||
.map(([key, value]) => {
|
||||
return {
|
||||
[pivotIDKey]: keys[i],
|
||||
[pivotValKey]: key,
|
||||
[keys[i]]: key,
|
||||
[subRowsKey]: value
|
||||
}
|
||||
return {
|
||||
[pivotIDKey]: keys[i],
|
||||
[pivotValKey]: key,
|
||||
[keys[i]]: key,
|
||||
[subRowsKey]: value
|
||||
}
|
||||
)
|
||||
})
|
||||
// Recurse into the subRows
|
||||
groupedRows = groupedRows.map(rowGroup => {
|
||||
let subRows = groupRecursively(rowGroup[subRowsKey], keys, i + 1)
|
||||
@ -431,7 +430,7 @@ export default {
|
||||
// Remove old filter first if it exists
|
||||
const newFiltering = (filtering || []).filter(x => x.id != column.id)
|
||||
|
||||
if (event.target.value != "") {
|
||||
if (event.target.value != '') {
|
||||
newFiltering.push({
|
||||
id: column.id,
|
||||
value: event.target.value
|
||||
|
||||
Loading…
Reference in New Issue
Block a user