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>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<div id="error-display"></div>
|
<div id="error-display"></div>
|
||||||
<script src="static/preview.742092f25ec9b6802477.bundle.js"></script>
|
<script src="static/preview.ea1bdf726a82703c8f6f.bundle.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
@ -38,7 +38,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body style="margin: 0;">
|
<body style="margin: 0;">
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script src="static/manager.1e44a83b81ae02b691ef.bundle.js"></script>
|
<script src="static/manager.064c8fe6b78907f0a142.bundle.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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},
|
{'-active': loading},
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
<div className='-loading-inner'>
|
<div className='-loading-inner'>
|
||||||
{loadingText}
|
{loadingText}
|
||||||
|
|||||||
88
src/index.js
88
src/index.js
@ -413,27 +413,27 @@ export default React.createClass({
|
|||||||
|
|
||||||
if (column.expander) {
|
if (column.expander) {
|
||||||
if (column.pivotColumns) {
|
if (column.pivotColumns) {
|
||||||
const pivotCols = [];
|
const pivotCols = []
|
||||||
for (let i = 0; i < column.pivotColumns.length; i++) {
|
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)
|
const filter = filtering.find(filter => filter.id == col.id)
|
||||||
pivotCols.push(
|
pivotCols.push(
|
||||||
<span key={col.id}
|
<span key={col.id}
|
||||||
style={{display: 'flex', alignContent: 'flex-end', flex: 1}}>
|
style={{display: 'flex', alignContent: 'flex-end', flex: 1}}>
|
||||||
<input type="text"
|
<input type='text'
|
||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
width: 20,
|
width: 20,
|
||||||
backgroundColor: i > 0 ? '#f3f3f3' : '#fff'
|
backgroundColor: i > 0 ? '#f3f3f3' : '#fff'
|
||||||
}}
|
}}
|
||||||
value={filter ? filter.value : ""}
|
value={filter ? filter.value : ''}
|
||||||
disabled={i > 0}
|
disabled={i > 0}
|
||||||
onChange={(event) => this.filterColumn(col, event)}
|
onChange={(event) => this.filterColumn(col, event)}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
if (i < column.pivotColumns.length - 1) {
|
if (i < column.pivotColumns.length - 1) {
|
||||||
pivotCols.push(<ExpanderComponent key={col.id + "-" + i}/>)
|
pivotCols.push(<ExpanderComponent key={col.id + '-' + i} />)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
@ -490,12 +490,12 @@ export default React.createClass({
|
|||||||
}}
|
}}
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
<input type="text"
|
<input type='text'
|
||||||
style={{
|
style={{
|
||||||
width: `100%`,
|
width: `100%`
|
||||||
}}
|
}}
|
||||||
value={filter ? filter.value : ""}
|
value={filter ? filter.value : ''}
|
||||||
onChange={(event) => this.filterColumn(column, event)}
|
onChange={(event) => this.filterColumn(column, event)}
|
||||||
/>
|
/>
|
||||||
</ThComponent>
|
</ThComponent>
|
||||||
)
|
)
|
||||||
@ -584,23 +584,23 @@ export default React.createClass({
|
|||||||
onClick={onTdClick}
|
onClick={onTdClick}
|
||||||
>
|
>
|
||||||
{rowInfo.subRows ? (
|
{rowInfo.subRows ? (
|
||||||
<span>
|
<span>
|
||||||
<ExpanderComponent
|
<ExpanderComponent
|
||||||
isExpanded={isExpanded}
|
isExpanded={isExpanded}
|
||||||
/>
|
/>
|
||||||
{column && column.pivotRender ? (
|
{column && column.pivotRender ? (
|
||||||
<PivotCell
|
<PivotCell
|
||||||
{...rowInfo}
|
{...rowInfo}
|
||||||
value={rowInfo.rowValues[pivotValKey]}
|
value={rowInfo.rowValues[pivotValKey]}
|
||||||
/>
|
/>
|
||||||
) : <span>{row[pivotValKey]} ({rowInfo.subRows.length})</span>}
|
) : <span>{row[pivotValKey]} ({rowInfo.subRows.length})</span>}
|
||||||
</span>
|
</span>
|
||||||
) : SubComponent ? (
|
) : SubComponent ? (
|
||||||
<span>
|
<span>
|
||||||
<ExpanderComponent
|
<ExpanderComponent
|
||||||
isExpanded={isExpanded}
|
isExpanded={isExpanded}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
) : null}
|
) : null}
|
||||||
</TdComponent>
|
</TdComponent>
|
||||||
)
|
)
|
||||||
@ -876,17 +876,17 @@ export default React.createClass({
|
|||||||
{hasColumnFooter ? makeColumnFooters() : null}
|
{hasColumnFooter ? makeColumnFooters() : null}
|
||||||
</TableComponent>
|
</TableComponent>
|
||||||
{showPagination ? (
|
{showPagination ? (
|
||||||
<PaginationComponent
|
<PaginationComponent
|
||||||
{...resolvedState}
|
{...resolvedState}
|
||||||
pages={pages}
|
pages={pages}
|
||||||
canPrevious={canPrevious}
|
canPrevious={canPrevious}
|
||||||
canNext={canNext}
|
canNext={canNext}
|
||||||
onPageChange={this.onPageChange}
|
onPageChange={this.onPageChange}
|
||||||
onPageSizeChange={this.onPageSizeChange}
|
onPageSizeChange={this.onPageSizeChange}
|
||||||
className={paginationProps.className}
|
className={paginationProps.className}
|
||||||
style={paginationProps.style}
|
style={paginationProps.style}
|
||||||
{...paginationProps.rest}
|
{...paginationProps.rest}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{!pageRows.length && (
|
{!pageRows.length && (
|
||||||
<NoDataComponent
|
<NoDataComponent
|
||||||
|
|||||||
@ -193,14 +193,13 @@ export default {
|
|||||||
let groupedRows = Object.entries(
|
let groupedRows = Object.entries(
|
||||||
_.groupBy(rows, keys[i]))
|
_.groupBy(rows, keys[i]))
|
||||||
.map(([key, value]) => {
|
.map(([key, value]) => {
|
||||||
return {
|
return {
|
||||||
[pivotIDKey]: keys[i],
|
[pivotIDKey]: keys[i],
|
||||||
[pivotValKey]: key,
|
[pivotValKey]: key,
|
||||||
[keys[i]]: key,
|
[keys[i]]: key,
|
||||||
[subRowsKey]: value
|
[subRowsKey]: value
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
// Recurse into the subRows
|
// Recurse into the subRows
|
||||||
groupedRows = groupedRows.map(rowGroup => {
|
groupedRows = groupedRows.map(rowGroup => {
|
||||||
let subRows = groupRecursively(rowGroup[subRowsKey], keys, i + 1)
|
let subRows = groupRecursively(rowGroup[subRowsKey], keys, i + 1)
|
||||||
@ -431,7 +430,7 @@ export default {
|
|||||||
// Remove old filter first if it exists
|
// Remove old filter first if it exists
|
||||||
const newFiltering = (filtering || []).filter(x => x.id != column.id)
|
const newFiltering = (filtering || []).filter(x => x.id != column.id)
|
||||||
|
|
||||||
if (event.target.value != "") {
|
if (event.target.value != '') {
|
||||||
newFiltering.push({
|
newFiltering.push({
|
||||||
id: column.id,
|
id: column.id,
|
||||||
value: event.target.value
|
value: event.target.value
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user