mirror of
https://github.com/gosticks/react-table.git
synced 2025-10-16 11:55:36 +00:00
Added data-driven-classes-and-styles example
- Also updated snapshots
This commit is contained in:
parent
a5e9653165
commit
50b00b67c5
@ -34,6 +34,9 @@
|
|||||||
- Column Resizing
|
- Column Resizing
|
||||||
- [Source](https://github.com/tannerlinsley/react-table/tree/master/examples/column-resizing)
|
- [Source](https://github.com/tannerlinsley/react-table/tree/master/examples/column-resizing)
|
||||||
- [Open in CodeSandbox](https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/column-resizing)
|
- [Open in CodeSandbox](https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/column-resizing)
|
||||||
|
- Data-Driven Classes and Styles
|
||||||
|
- [Source](https://github.com/tannerlinsley/react-table/tree/master/examples/data-driven-classes-and-styles)
|
||||||
|
- [Open in CodeSandbox](https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/data-driven-classes-and-styles)
|
||||||
- **Complex**
|
- **Complex**
|
||||||
- The "Kitchen Sink"
|
- The "Kitchen Sink"
|
||||||
- [Source](https://github.com/tannerlinsley/react-table/tree/master/examples/kitchen-sink)
|
- [Source](https://github.com/tannerlinsley/react-table/tree/master/examples/kitchen-sink)
|
||||||
|
|||||||
4
examples/data-driven-classes-and-styles/.babelrc
Normal file
4
examples/data-driven-classes-and-styles/.babelrc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"presets": ["react-app"],
|
||||||
|
"plugins": ["styled-components"]
|
||||||
|
}
|
||||||
1
examples/data-driven-classes-and-styles/.env
Normal file
1
examples/data-driven-classes-and-styles/.env
Normal file
@ -0,0 +1 @@
|
|||||||
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
7
examples/data-driven-classes-and-styles/.eslintrc
Normal file
7
examples/data-driven-classes-and-styles/.eslintrc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"extends": ["react-app", "prettier"],
|
||||||
|
"rules": {
|
||||||
|
// "eqeqeq": 0,
|
||||||
|
// "jsx-a11y/anchor-is-valid": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
23
examples/data-driven-classes-and-styles/.gitignore
vendored
Normal file
23
examples/data-driven-classes-and-styles/.gitignore
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
29
examples/data-driven-classes-and-styles/.rescriptsrc.js
Normal file
29
examples/data-driven-classes-and-styles/.rescriptsrc.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
const path = require('path')
|
||||||
|
const resolveFrom = require('resolve-from')
|
||||||
|
|
||||||
|
const fixLinkedDependencies = config => {
|
||||||
|
config.resolve = {
|
||||||
|
...config.resolve,
|
||||||
|
alias: {
|
||||||
|
...config.resolve.alias,
|
||||||
|
react$: resolveFrom(path.resolve('node_modules'), 'react'),
|
||||||
|
'react-dom$': resolveFrom(path.resolve('node_modules'), 'react-dom'),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
}
|
||||||
|
|
||||||
|
const includeSrcDirectory = config => {
|
||||||
|
config.resolve = {
|
||||||
|
...config.resolve,
|
||||||
|
modules: [path.resolve('src'), ...config.resolve.modules],
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
['use-babel-config', '.babelrc'],
|
||||||
|
['use-eslint-config', '.eslintrc'],
|
||||||
|
fixLinkedDependencies,
|
||||||
|
// includeSrcDirectory,
|
||||||
|
]
|
||||||
6
examples/data-driven-classes-and-styles/README.md
Normal file
6
examples/data-driven-classes-and-styles/README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app) and Rescripts.
|
||||||
|
|
||||||
|
You can:
|
||||||
|
|
||||||
|
- [Open this example in a new CodeSandbox](https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/data-driven-classes-and-styles)
|
||||||
|
- `yarn` and `yarn start` to run and edit the example
|
||||||
35
examples/data-driven-classes-and-styles/package.json
Normal file
35
examples/data-driven-classes-and-styles/package.json
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"start": "rescripts start",
|
||||||
|
"build": "rescripts build",
|
||||||
|
"test": "rescripts test",
|
||||||
|
"eject": "rescripts eject"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"namor": "^1.1.2",
|
||||||
|
"react": "^16.8.6",
|
||||||
|
"react-dom": "^16.8.6",
|
||||||
|
"react-scripts": "3.0.1",
|
||||||
|
"react-table": "next",
|
||||||
|
"styled-components": "^4.3.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@rescripts/cli": "^0.0.11",
|
||||||
|
"@rescripts/rescript-use-babel-config": "^0.0.8",
|
||||||
|
"@rescripts/rescript-use-eslint-config": "^0.0.9",
|
||||||
|
"babel-eslint": "10.0.1"
|
||||||
|
},
|
||||||
|
"browserslist": {
|
||||||
|
"production": [
|
||||||
|
">0.2%",
|
||||||
|
"not dead",
|
||||||
|
"not op_mini all"
|
||||||
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
examples/data-driven-classes-and-styles/public/favicon.ico
Normal file
BIN
examples/data-driven-classes-and-styles/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
38
examples/data-driven-classes-and-styles/public/index.html
Normal file
38
examples/data-driven-classes-and-styles/public/index.html
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<!--
|
||||||
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
|
-->
|
||||||
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
|
<!--
|
||||||
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
|
|
||||||
|
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||||
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
|
-->
|
||||||
|
<title>React App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
|
This HTML file is a template.
|
||||||
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
|
|
||||||
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
|
-->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
examples/data-driven-classes-and-styles/public/manifest.json
Normal file
15
examples/data-driven-classes-and-styles/public/manifest.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"short_name": "React App",
|
||||||
|
"name": "Create React App Sample",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon.ico",
|
||||||
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
|
"type": "image/x-icon"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#000000",
|
||||||
|
"background_color": "#ffffff"
|
||||||
|
}
|
||||||
202
examples/data-driven-classes-and-styles/src/App.js
Normal file
202
examples/data-driven-classes-and-styles/src/App.js
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import styled from 'styled-components'
|
||||||
|
import { useTable, utils } from 'react-table'
|
||||||
|
|
||||||
|
import makeData from './makeData'
|
||||||
|
|
||||||
|
const Styles = styled.div`
|
||||||
|
padding: 1rem;
|
||||||
|
|
||||||
|
.user {
|
||||||
|
background-color: blue;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-spacing: 0;
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
|
tr {
|
||||||
|
:last-child {
|
||||||
|
td {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-bottom: 1px solid black;
|
||||||
|
border-right: 1px solid black;
|
||||||
|
|
||||||
|
:last-child {
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
|
// Create a default prop getter
|
||||||
|
const defaultPropGetter = () => ({})
|
||||||
|
|
||||||
|
// Expose some prop getters for headers, rows and cells, or more if you want!
|
||||||
|
function Table({
|
||||||
|
columns,
|
||||||
|
data,
|
||||||
|
getHeaderProps = defaultPropGetter,
|
||||||
|
getColumnProps = defaultPropGetter,
|
||||||
|
getRowProps = defaultPropGetter,
|
||||||
|
getCellProps = defaultPropGetter,
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
getTableProps,
|
||||||
|
getTableBodyProps,
|
||||||
|
headerGroups,
|
||||||
|
rows,
|
||||||
|
prepareRow,
|
||||||
|
} = useTable({
|
||||||
|
columns,
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
|
||||||
|
return (
|
||||||
|
<table {...getTableProps()}>
|
||||||
|
<thead>
|
||||||
|
{headerGroups.map(headerGroup => (
|
||||||
|
<tr {...headerGroup.getHeaderGroupProps()}>
|
||||||
|
{headerGroup.headers.map(column => (
|
||||||
|
<th
|
||||||
|
// Merge all of the header Props
|
||||||
|
{...utils.mergeProps(
|
||||||
|
column.getHeaderProps(),
|
||||||
|
{
|
||||||
|
className: column.className,
|
||||||
|
style: column.style,
|
||||||
|
},
|
||||||
|
getColumnProps(column),
|
||||||
|
getHeaderProps(column)
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{column.render('Header')}
|
||||||
|
</th>
|
||||||
|
))}
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</thead>
|
||||||
|
<tbody {...getTableBodyProps()}>
|
||||||
|
{rows.map((row, i) => {
|
||||||
|
prepareRow(row)
|
||||||
|
return (
|
||||||
|
// Merge row props
|
||||||
|
<tr {...utils.mergeProps(row.getRowProps(), getRowProps(row))}>
|
||||||
|
{row.cells.map(cell => {
|
||||||
|
return (
|
||||||
|
<td
|
||||||
|
// Merge cell props
|
||||||
|
{...utils.mergeProps(
|
||||||
|
cell.getCellProps(),
|
||||||
|
{
|
||||||
|
className: cell.column.className,
|
||||||
|
style: cell.column.style,
|
||||||
|
},
|
||||||
|
getColumnProps(cell.column),
|
||||||
|
getCellProps(cell)
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{cell.render('Cell')}
|
||||||
|
</td>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</tr>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function App() {
|
||||||
|
const columns = React.useMemo(
|
||||||
|
() => [
|
||||||
|
{
|
||||||
|
Header: 'Name',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
Header: 'First Name',
|
||||||
|
accessor: 'firstName',
|
||||||
|
className: 'user',
|
||||||
|
style: {
|
||||||
|
fontWeight: 'bolder',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Scores',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
Header: 'Day 1',
|
||||||
|
accessor: 'score0',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Day 2',
|
||||||
|
accessor: 'score1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Day 3',
|
||||||
|
accessor: 'score2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Day 4',
|
||||||
|
accessor: 'score3',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Day 5',
|
||||||
|
accessor: 'score4',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Day 6',
|
||||||
|
accessor: 'score5',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Day 7',
|
||||||
|
accessor: 'score6',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[]
|
||||||
|
)
|
||||||
|
|
||||||
|
const data = React.useMemo(() => makeData(20), [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Styles>
|
||||||
|
<Table
|
||||||
|
columns={columns}
|
||||||
|
data={data}
|
||||||
|
getHeaderProps={column => ({
|
||||||
|
onClick: () => alert('Header!'),
|
||||||
|
})}
|
||||||
|
getColumnProps={column => ({
|
||||||
|
onClick: () => alert('Column!'),
|
||||||
|
})}
|
||||||
|
getRowProps={row => ({
|
||||||
|
style: {
|
||||||
|
background: row.index % 2 === 0 ? 'rgba(0,0,0,.1)' : 'white',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
getCellProps={cellInfo => ({
|
||||||
|
style: {
|
||||||
|
backgroundColor: `hsl(${120 * ((120 - cellInfo.value) / 120) * -1 +
|
||||||
|
120}, 100%, 67%)`,
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
</Styles>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default App
|
||||||
9
examples/data-driven-classes-and-styles/src/App.test.js
Normal file
9
examples/data-driven-classes-and-styles/src/App.test.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import ReactDOM from 'react-dom'
|
||||||
|
import App from './App'
|
||||||
|
|
||||||
|
it('renders without crashing', () => {
|
||||||
|
const div = document.createElement('div')
|
||||||
|
ReactDOM.render(<App />, div)
|
||||||
|
ReactDOM.unmountComponentAtNode(div)
|
||||||
|
})
|
||||||
13
examples/data-driven-classes-and-styles/src/index.css
Normal file
13
examples/data-driven-classes-and-styles/src/index.css
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||||
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||||
|
monospace;
|
||||||
|
}
|
||||||
12
examples/data-driven-classes-and-styles/src/index.js
Normal file
12
examples/data-driven-classes-and-styles/src/index.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import ReactDOM from 'react-dom'
|
||||||
|
import './index.css'
|
||||||
|
import App from './App'
|
||||||
|
import * as serviceWorker from './serviceWorker'
|
||||||
|
|
||||||
|
ReactDOM.render(<App />, document.getElementById('root'))
|
||||||
|
|
||||||
|
// If you want your app to work offline and load faster, you can change
|
||||||
|
// unregister() to register() below. Note this comes with some pitfalls.
|
||||||
|
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||||
|
serviceWorker.unregister()
|
||||||
36
examples/data-driven-classes-and-styles/src/makeData.js
Normal file
36
examples/data-driven-classes-and-styles/src/makeData.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import namor from 'namor'
|
||||||
|
|
||||||
|
const range = len => {
|
||||||
|
const arr = []
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
arr.push(i)
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
const newPerson = () => {
|
||||||
|
return {
|
||||||
|
firstName: namor.generate({ words: 1, numbers: 0 }),
|
||||||
|
score0: Math.floor(Math.random() * 100),
|
||||||
|
score1: Math.floor(Math.random() * 100),
|
||||||
|
score2: Math.floor(Math.random() * 100),
|
||||||
|
score3: Math.floor(Math.random() * 100),
|
||||||
|
score4: Math.floor(Math.random() * 100),
|
||||||
|
score5: Math.floor(Math.random() * 100),
|
||||||
|
score6: Math.floor(Math.random() * 100),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function makeData(...lens) {
|
||||||
|
const makeDataLevel = (depth = 0) => {
|
||||||
|
const len = lens[depth]
|
||||||
|
return range(len).map(d => {
|
||||||
|
return {
|
||||||
|
...newPerson(),
|
||||||
|
subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return makeDataLevel()
|
||||||
|
}
|
||||||
135
examples/data-driven-classes-and-styles/src/serviceWorker.js
Normal file
135
examples/data-driven-classes-and-styles/src/serviceWorker.js
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
// This optional code is used to register a service worker.
|
||||||
|
// register() is not called by default.
|
||||||
|
|
||||||
|
// This lets the app load faster on subsequent visits in production, and gives
|
||||||
|
// it offline capabilities. However, it also means that developers (and users)
|
||||||
|
// will only see deployed updates on subsequent visits to a page, after all the
|
||||||
|
// existing tabs open on the page have been closed, since previously cached
|
||||||
|
// resources are updated in the background.
|
||||||
|
|
||||||
|
// To learn more about the benefits of this model and instructions on how to
|
||||||
|
// opt-in, read https://bit.ly/CRA-PWA
|
||||||
|
|
||||||
|
const isLocalhost = Boolean(
|
||||||
|
window.location.hostname === 'localhost' ||
|
||||||
|
// [::1] is the IPv6 localhost address.
|
||||||
|
window.location.hostname === '[::1]' ||
|
||||||
|
// 127.0.0.1/8 is considered localhost for IPv4.
|
||||||
|
window.location.hostname.match(
|
||||||
|
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
export function register(config) {
|
||||||
|
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||||
|
// The URL constructor is available in all browsers that support SW.
|
||||||
|
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href)
|
||||||
|
if (publicUrl.origin !== window.location.origin) {
|
||||||
|
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||||
|
// from what our page is served on. This might happen if a CDN is used to
|
||||||
|
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('load', () => {
|
||||||
|
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`
|
||||||
|
|
||||||
|
if (isLocalhost) {
|
||||||
|
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||||
|
checkValidServiceWorker(swUrl, config)
|
||||||
|
|
||||||
|
// Add some additional logging to localhost, pointing developers to the
|
||||||
|
// service worker/PWA documentation.
|
||||||
|
navigator.serviceWorker.ready.then(() => {
|
||||||
|
console.log(
|
||||||
|
'This web app is being served cache-first by a service ' +
|
||||||
|
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// Is not localhost. Just register service worker
|
||||||
|
registerValidSW(swUrl, config)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function registerValidSW(swUrl, config) {
|
||||||
|
navigator.serviceWorker
|
||||||
|
.register(swUrl)
|
||||||
|
.then(registration => {
|
||||||
|
registration.onupdatefound = () => {
|
||||||
|
const installingWorker = registration.installing
|
||||||
|
if (installingWorker == null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
installingWorker.onstatechange = () => {
|
||||||
|
if (installingWorker.state === 'installed') {
|
||||||
|
if (navigator.serviceWorker.controller) {
|
||||||
|
// At this point, the updated precached content has been fetched,
|
||||||
|
// but the previous service worker will still serve the older
|
||||||
|
// content until all client tabs are closed.
|
||||||
|
console.log(
|
||||||
|
'New content is available and will be used when all ' +
|
||||||
|
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
||||||
|
)
|
||||||
|
|
||||||
|
// Execute callback
|
||||||
|
if (config && config.onUpdate) {
|
||||||
|
config.onUpdate(registration)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// At this point, everything has been precached.
|
||||||
|
// It's the perfect time to display a
|
||||||
|
// "Content is cached for offline use." message.
|
||||||
|
console.log('Content is cached for offline use.')
|
||||||
|
|
||||||
|
// Execute callback
|
||||||
|
if (config && config.onSuccess) {
|
||||||
|
config.onSuccess(registration)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error during service worker registration:', error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkValidServiceWorker(swUrl, config) {
|
||||||
|
// Check if the service worker can be found. If it can't reload the page.
|
||||||
|
fetch(swUrl)
|
||||||
|
.then(response => {
|
||||||
|
// Ensure service worker exists, and that we really are getting a JS file.
|
||||||
|
const contentType = response.headers.get('content-type')
|
||||||
|
if (
|
||||||
|
response.status === 404 ||
|
||||||
|
(contentType != null && contentType.indexOf('javascript') === -1)
|
||||||
|
) {
|
||||||
|
// No service worker found. Probably a different app. Reload the page.
|
||||||
|
navigator.serviceWorker.ready.then(registration => {
|
||||||
|
registration.unregister().then(() => {
|
||||||
|
window.location.reload()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// Service worker found. Proceed as normal.
|
||||||
|
registerValidSW(swUrl, config)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
console.log(
|
||||||
|
'No internet connection found. App is running in offline mode.'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function unregister() {
|
||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
navigator.serviceWorker.ready.then(registration => {
|
||||||
|
registration.unregister()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
10145
examples/data-driven-classes-and-styles/yarn.lock
Normal file
10145
examples/data-driven-classes-and-styles/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@ -17,8 +17,11 @@ Snapshot Diff:
|
|||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<table
|
<table>
|
||||||
@@ -86,10 +88,53 @@
|
<thead>
|
||||||
|
@@ -64,10 +66,37 @@
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer; padding-left: 0rem;"
|
style="cursor: pointer; padding-left: 0rem;"
|
||||||
@ -53,8 +56,10 @@ Snapshot Diff:
|
|||||||
👉
|
👉
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td>
|
||||||
@@ -119,10 +164,139 @@
|
@@ -85,10 +114,91 @@
|
||||||
|
<td>
|
||||||
|
In Relationship
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
50
|
50
|
||||||
@ -142,6 +147,8 @@ Snapshot Diff:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders an expandable table 2`] = `
|
exports[`renders an expandable table 2`] = `
|
||||||
@ -162,12 +169,13 @@ Snapshot Diff:
|
|||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<table
|
<table>
|
||||||
@@ -131,11 +132,54 @@
|
@@ -94,10 +95,37 @@
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer; padding-left: 2rem;"
|
style="cursor: pointer; padding-left: 2rem;"
|
||||||
+ >
|
>
|
||||||
+ 👇
|
+ 👇
|
||||||
+ </span>
|
+ </span>
|
||||||
+ </td>
|
+ </td>
|
||||||
@ -198,8 +206,11 @@ Snapshot Diff:
|
|||||||
👉
|
👉
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td>
|
||||||
@@ -164,10 +208,139 @@
|
tanner
|
||||||
|
@@ -114,10 +142,91 @@
|
||||||
|
<td>
|
||||||
|
In Relationship
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
50
|
50
|
||||||
@ -287,6 +298,8 @@ Snapshot Diff:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders an expandable table 3`] = `
|
exports[`renders an expandable table 3`] = `
|
||||||
@ -307,12 +320,13 @@ Snapshot Diff:
|
|||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<table
|
<table>
|
||||||
@@ -175,11 +176,54 @@
|
@@ -122,10 +123,37 @@
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer; padding-left: 4rem;"
|
style="cursor: pointer; padding-left: 4rem;"
|
||||||
+ >
|
>
|
||||||
+ 👇
|
+ 👇
|
||||||
+ </span>
|
+ </span>
|
||||||
+ </td>
|
+ </td>
|
||||||
@ -343,8 +357,11 @@ Snapshot Diff:
|
|||||||
👉
|
👉
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td>
|
||||||
@@ -208,10 +252,139 @@
|
tanner
|
||||||
|
@@ -142,10 +170,91 @@
|
||||||
|
<td>
|
||||||
|
In Relationship
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
50
|
50
|
||||||
@ -432,6 +449,8 @@ Snapshot Diff:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders an expandable table 4`] = `
|
exports[`renders an expandable table 4`] = `
|
||||||
@ -452,9 +471,10 @@ Snapshot Diff:
|
|||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<table
|
<table>
|
||||||
@@ -220,11 +221,11 @@
|
@@ -150,11 +151,11 @@
|
||||||
>
|
<tr>
|
||||||
|
<td>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer; padding-left: 6rem;"
|
style="cursor: pointer; padding-left: 6rem;"
|
||||||
>
|
>
|
||||||
@ -463,7 +483,11 @@ Snapshot Diff:
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -252,10 +253,30 @@
|
tanner
|
||||||
|
</td>
|
||||||
|
@@ -170,10 +171,30 @@
|
||||||
|
<td>
|
||||||
|
In Relationship
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
50
|
50
|
||||||
@ -490,6 +514,8 @@ Snapshot Diff:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders an expandable table 5`] = `
|
exports[`renders an expandable table 5`] = `
|
||||||
@ -512,9 +538,11 @@ Snapshot Diff:
|
|||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<table
|
<table>
|
||||||
@@ -92,140 +87,11 @@
|
<thead>
|
||||||
>
|
@@ -70,92 +65,11 @@
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer; padding-left: 0rem;"
|
style="cursor: pointer; padding-left: 0rem;"
|
||||||
>
|
>
|
||||||
@ -604,7 +632,11 @@ Snapshot Diff:
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -253,417 +119,10 @@
|
tanner
|
||||||
|
</td>
|
||||||
|
@@ -171,273 +85,10 @@
|
||||||
|
<td>
|
||||||
|
In Relationship
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
50
|
50
|
||||||
@ -874,4 +906,6 @@ Snapshot Diff:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span
|
||||||
`;
|
`;
|
||||||
|
|||||||
@ -5,7 +5,7 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -37,11 +37,11 @@
|
@@ -27,11 +27,11 @@
|
||||||
colspan="1"
|
colspan="1"
|
||||||
>
|
>
|
||||||
Last Name
|
Last Name
|
||||||
@ -17,7 +17,10 @@ Snapshot Diff:
|
|||||||
</th>
|
</th>
|
||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
@@ -117,78 +117,10 @@
|
>
|
||||||
|
@@ -87,50 +87,10 @@
|
||||||
|
<td>
|
||||||
|
status: In Relationship
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
progress: 50
|
progress: 50
|
||||||
@ -64,6 +67,8 @@ Snapshot Diff:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
firstName: jaylen
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders a filterable table 2`] = `
|
exports[`renders a filterable table 2`] = `
|
||||||
@ -71,7 +76,7 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -37,11 +37,11 @@
|
@@ -27,11 +27,11 @@
|
||||||
colspan="1"
|
colspan="1"
|
||||||
>
|
>
|
||||||
Last Name
|
Last Name
|
||||||
@ -83,8 +88,12 @@ Snapshot Diff:
|
|||||||
</th>
|
</th>
|
||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
@@ -91,70 +91,70 @@
|
>
|
||||||
>
|
@@ -71,46 +71,46 @@
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- firstName: tanner
|
- firstName: tanner
|
||||||
+ firstName: derek
|
+ firstName: derek
|
||||||
|
|||||||
@ -5,7 +5,8 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -29,13 +29,13 @@
|
@@ -19,24 +19,24 @@
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
title="Toggle GroupBy"
|
title="Toggle GroupBy"
|
||||||
@ -19,7 +20,7 @@ Snapshot Diff:
|
|||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
>
|
>
|
||||||
@@ -44,11 +44,11 @@
|
<span
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
title="Toggle GroupBy"
|
title="Toggle GroupBy"
|
||||||
>
|
>
|
||||||
@ -31,50 +32,54 @@ Snapshot Diff:
|
|||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
>
|
>
|
||||||
@@ -109,138 +109,119 @@
|
<span
|
||||||
>
|
@@ -83,86 +83,81 @@
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- firstName: tanner
|
- firstName: tanner
|
||||||
- </td>
|
|
||||||
- <td
|
|
||||||
+ <span
|
+ <span
|
||||||
+ style="cursor: pointer;"
|
+ style="cursor: pointer;"
|
||||||
>
|
+ >
|
||||||
- lastName: linsley
|
|
||||||
- </td>
|
|
||||||
- <td>
|
|
||||||
- age: 29
|
|
||||||
- </td>
|
|
||||||
- <td>
|
|
||||||
- visits: 100
|
|
||||||
- </td>
|
|
||||||
- <td>
|
|
||||||
- status: In Relationship
|
|
||||||
+ 👉
|
+ 👉
|
||||||
+ </span>
|
+ </span>
|
||||||
+ lastName: linsley (2)
|
+ lastName: linsley (2)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
- lastName: linsley
|
||||||
|
+ 2 Names
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
- age: 29
|
||||||
|
+ 27.5 (avg)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
- visits: 100
|
||||||
|
- </td>
|
||||||
|
- <td>
|
||||||
|
- status: In Relationship
|
||||||
|
- </td>
|
||||||
|
- <td>
|
||||||
- progress: 50
|
- progress: 50
|
||||||
- </td>
|
- </td>
|
||||||
- </tr>
|
- </tr>
|
||||||
- <tr>
|
- <tr>
|
||||||
- <td>
|
- <td>
|
||||||
- firstName: derek
|
- firstName: derek
|
||||||
- </td>
|
|
||||||
- <td>
|
|
||||||
- lastName: perkins
|
|
||||||
+ 2 Names
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
- age: 40
|
|
||||||
+ 27.5 (avg)
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
- visits: 40
|
|
||||||
+ 199 (total)
|
+ 199 (total)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
- lastName: perkins
|
||||||
|
- </td>
|
||||||
|
- <td>
|
||||||
|
- age: 40
|
||||||
|
- </td>
|
||||||
|
- <td>
|
||||||
|
- visits: 40
|
||||||
|
- </td>
|
||||||
|
- <td>
|
||||||
- status: Single
|
- status: Single
|
||||||
+ status: null
|
+ status: null
|
||||||
</td>
|
</td>
|
||||||
@ -155,33 +160,37 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -6,17 +6,29 @@
|
@@ -1,16 +1,26 @@
|
||||||
|
<DocumentFragment>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th
|
<th
|
||||||
- colspan="2"
|
- colspan="2"
|
||||||
+ colspan="1"
|
+ colspan="1"
|
||||||
>
|
+ >
|
||||||
Name
|
+ Name
|
||||||
</th>
|
+ </th>
|
||||||
<th
|
+ <th
|
||||||
- colspan="4"
|
|
||||||
+ colspan="1"
|
+ colspan="1"
|
||||||
+ >
|
+ >
|
||||||
+ Info
|
+ Info
|
||||||
+ </th>
|
+ </th>
|
||||||
+ <th
|
+ <th
|
||||||
+ colspan="1"
|
+ colspan="1"
|
||||||
+ >
|
>
|
||||||
+ Name
|
Name
|
||||||
+ </th>
|
</th>
|
||||||
+ <th
|
<th
|
||||||
|
- colspan="4"
|
||||||
+ colspan="3"
|
+ colspan="3"
|
||||||
>
|
>
|
||||||
Info
|
Info
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr
|
<tr>
|
||||||
@@ -42,13 +54,13 @@
|
@@ -30,35 +40,35 @@
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
title="Toggle GroupBy"
|
title="Toggle GroupBy"
|
||||||
@ -195,7 +204,7 @@ Snapshot Diff:
|
|||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
>
|
>
|
||||||
@@ -57,11 +69,11 @@
|
<span
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
title="Toggle GroupBy"
|
title="Toggle GroupBy"
|
||||||
>
|
>
|
||||||
@ -207,7 +216,7 @@ Snapshot Diff:
|
|||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
>
|
>
|
||||||
@@ -70,11 +82,11 @@
|
<span
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
title="Toggle GroupBy"
|
title="Toggle GroupBy"
|
||||||
>
|
>
|
||||||
@ -219,61 +228,67 @@ Snapshot Diff:
|
|||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
>
|
>
|
||||||
@@ -116,10 +128,13 @@
|
<span
|
||||||
|
@@ -90,18 +100,16 @@
|
||||||
>
|
>
|
||||||
👉
|
👉
|
||||||
</span>
|
</span>
|
||||||
lastName: linsley (2)
|
lastName: linsley (2)
|
||||||
</td>
|
</td>
|
||||||
+ <td
|
+ <td />
|
||||||
+ />
|
|
||||||
<td>
|
<td>
|
||||||
2 Names
|
2 Names
|
||||||
</td>
|
</td>
|
||||||
@@ -129,15 +144,10 @@
|
<td>
|
||||||
27.5 (avg)
|
27.5 (avg)
|
||||||
|
- </td>
|
||||||
|
- <td>
|
||||||
|
- 199 (total)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
- 199 (total)
|
status: null
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@@ -115,20 +123,18 @@
|
||||||
|
>
|
||||||
|
👉
|
||||||
|
</span>
|
||||||
|
lastName: perkins (1)
|
||||||
|
</td>
|
||||||
|
+ <td />
|
||||||
|
<td>
|
||||||
|
1 Names
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
40 (avg)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
- 40 (total)
|
||||||
- </td>
|
- </td>
|
||||||
- <td>
|
- <td>
|
||||||
status: null
|
status: null
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -157,22 +167,20 @@
|
80 (med)
|
||||||
</span>
|
|
||||||
lastName: perkins (1)
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
@@ -140,18 +146,16 @@
|
||||||
- 1 Names
|
>
|
||||||
- </td>
|
👉
|
||||||
+ />
|
|
||||||
<td>
|
|
||||||
- 40 (avg)
|
|
||||||
+ 1 Names
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
- 40 (total)
|
|
||||||
+ 40 (avg)
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
status: null
|
|
||||||
@@ -196,22 +204,20 @@
|
|
||||||
</span>
|
</span>
|
||||||
lastName: bergevin (1)
|
lastName: bergevin (1)
|
||||||
</td>
|
</td>
|
||||||
|
+ <td />
|
||||||
<td>
|
<td>
|
||||||
- 1 Names
|
1 Names
|
||||||
- </td>
|
|
||||||
+ />
|
|
||||||
<td>
|
|
||||||
- 45 (avg)
|
|
||||||
+ 1 Names
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
45 (avg)
|
||||||
|
- </td>
|
||||||
|
- <td>
|
||||||
- 20 (total)
|
- 20 (total)
|
||||||
+ 45 (avg)
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
status: null
|
status: null
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@ -5,94 +5,146 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -67,11 +67,11 @@
|
@@ -47,11 +47,11 @@
|
||||||
>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 21
|
- tanner 21
|
||||||
+ tanner 31
|
+ tanner 31
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -101,11 +101,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -67,11 +67,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 22
|
- tanner 22
|
||||||
+ tanner 32
|
+ tanner 32
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -135,11 +135,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -87,11 +87,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 23
|
- tanner 23
|
||||||
+ tanner 33
|
+ tanner 33
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -169,11 +169,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -107,11 +107,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 24
|
- tanner 24
|
||||||
+ tanner 34
|
+ tanner 34
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -203,11 +203,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -127,11 +127,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 25
|
- tanner 25
|
||||||
+ tanner 35
|
+ tanner 35
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -237,11 +237,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -147,11 +147,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 26
|
- tanner 26
|
||||||
+ tanner 36
|
+ tanner 36
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -271,11 +271,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -167,11 +167,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 27
|
- tanner 27
|
||||||
+ tanner 37
|
+ tanner 37
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -305,11 +305,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -187,11 +187,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 28
|
- tanner 28
|
||||||
+ tanner 38
|
+ tanner 38
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -339,11 +339,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -207,11 +207,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 29
|
- tanner 29
|
||||||
+ tanner 39
|
+ tanner 39
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -373,11 +373,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -227,11 +227,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 30
|
- tanner 30
|
||||||
+ tanner 40
|
+ tanner 40
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -425,20 +425,20 @@
|
</td>
|
||||||
|
<td>
|
||||||
|
@@ -269,20 +269,20 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
Page
|
Page
|
||||||
<strong>
|
<strong>
|
||||||
- 3 of 10
|
- 3 of 10
|
||||||
+ 4 of 10
|
+ 4 of 10
|
||||||
</strong>
|
</strong>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
| Go to page:
|
| Go to page:
|
||||||
@ -103,6 +155,7 @@ Snapshot Diff:
|
|||||||
+ value="4"
|
+ value="4"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<select>
|
<select>
|
||||||
<option
|
<option
|
||||||
`;
|
`;
|
||||||
@ -112,94 +165,146 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -67,11 +67,11 @@
|
@@ -47,11 +47,11 @@
|
||||||
>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 31
|
- tanner 31
|
||||||
+ tanner 41
|
+ tanner 41
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -101,11 +101,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -67,11 +67,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 32
|
- tanner 32
|
||||||
+ tanner 42
|
+ tanner 42
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -135,11 +135,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -87,11 +87,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 33
|
- tanner 33
|
||||||
+ tanner 43
|
+ tanner 43
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -169,11 +169,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -107,11 +107,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 34
|
- tanner 34
|
||||||
+ tanner 44
|
+ tanner 44
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -203,11 +203,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -127,11 +127,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 35
|
- tanner 35
|
||||||
+ tanner 45
|
+ tanner 45
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -237,11 +237,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -147,11 +147,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 36
|
- tanner 36
|
||||||
+ tanner 46
|
+ tanner 46
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -271,11 +271,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -167,11 +167,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 37
|
- tanner 37
|
||||||
+ tanner 47
|
+ tanner 47
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -305,11 +305,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -187,11 +187,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 38
|
- tanner 38
|
||||||
+ tanner 48
|
+ tanner 48
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -339,11 +339,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -207,11 +207,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 39
|
- tanner 39
|
||||||
+ tanner 49
|
+ tanner 49
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -373,11 +373,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -227,11 +227,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 40
|
- tanner 40
|
||||||
+ tanner 50
|
+ tanner 50
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -425,20 +425,20 @@
|
</td>
|
||||||
|
<td>
|
||||||
|
@@ -269,20 +269,20 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
Page
|
Page
|
||||||
<strong>
|
<strong>
|
||||||
- 4 of 10
|
- 4 of 10
|
||||||
+ 5 of 10
|
+ 5 of 10
|
||||||
</strong>
|
</strong>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
| Go to page:
|
| Go to page:
|
||||||
@ -210,6 +315,7 @@ Snapshot Diff:
|
|||||||
+ value="5"
|
+ value="5"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<select>
|
<select>
|
||||||
<option
|
<option
|
||||||
`;
|
`;
|
||||||
@ -219,108 +325,163 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -67,11 +67,11 @@
|
@@ -47,11 +47,11 @@
|
||||||
>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 41
|
- tanner 41
|
||||||
+ tanner 91
|
+ tanner 91
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -101,11 +101,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -67,11 +67,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 42
|
- tanner 42
|
||||||
+ tanner 92
|
+ tanner 92
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -135,11 +135,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -87,11 +87,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 43
|
- tanner 43
|
||||||
+ tanner 93
|
+ tanner 93
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -169,11 +169,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -107,11 +107,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 44
|
- tanner 44
|
||||||
+ tanner 94
|
+ tanner 94
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -203,11 +203,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -127,11 +127,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 45
|
- tanner 45
|
||||||
+ tanner 95
|
+ tanner 95
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -237,11 +237,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -147,11 +147,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 46
|
- tanner 46
|
||||||
+ tanner 96
|
+ tanner 96
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -271,11 +271,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -167,11 +167,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 47
|
- tanner 47
|
||||||
+ tanner 97
|
+ tanner 97
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -305,11 +305,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -187,11 +187,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 48
|
- tanner 48
|
||||||
+ tanner 98
|
+ tanner 98
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -339,11 +339,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -207,11 +207,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 49
|
- tanner 49
|
||||||
+ tanner 99
|
+ tanner 99
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -373,11 +373,11 @@
|
</td>
|
||||||
>
|
<td>
|
||||||
|
@@ -227,11 +227,11 @@
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- tanner 50
|
- tanner 50
|
||||||
+ tanner 100
|
+ tanner 100
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
linsley
|
linsley
|
||||||
@@ -414,31 +414,35 @@
|
</td>
|
||||||
|
<td>
|
||||||
|
@@ -258,31 +258,35 @@
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<
|
<
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
- <button>
|
- <button>
|
||||||
+ <button
|
+ <button
|
||||||
+ disabled=""
|
+ disabled=""
|
||||||
+ >
|
+ >
|
||||||
>
|
>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
- <button>
|
- <button>
|
||||||
+ <button
|
+ <button
|
||||||
+ disabled=""
|
+ disabled=""
|
||||||
+ >
|
+ >
|
||||||
>>
|
>>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
Page
|
Page
|
||||||
<strong>
|
<strong>
|
||||||
- 5 of 10
|
- 5 of 10
|
||||||
+ 10 of 10
|
+ 10 of 10
|
||||||
</strong>
|
</strong>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
| Go to page:
|
| Go to page:
|
||||||
@ -331,6 +492,7 @@ Snapshot Diff:
|
|||||||
+ value="10"
|
+ value="10"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<select>
|
<select>
|
||||||
<option
|
<option
|
||||||
`;
|
`;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -31,11 +31,13 @@
|
@@ -22,11 +22,13 @@
|
||||||
colspan="1"
|
colspan="1"
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
title="Toggle SortBy"
|
title="Toggle SortBy"
|
||||||
@ -19,8 +19,12 @@ Snapshot Diff:
|
|||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
@@ -89,104 +91,104 @@
|
title="Toggle SortBy"
|
||||||
>
|
@@ -69,66 +71,66 @@
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- firstName: tanner
|
- firstName: tanner
|
||||||
+ firstName: derek
|
+ firstName: derek
|
||||||
@ -108,7 +112,7 @@ Snapshot Diff:
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -32,11 +32,11 @@
|
@@ -23,11 +23,11 @@
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
title="Toggle SortBy"
|
title="Toggle SortBy"
|
||||||
>
|
>
|
||||||
@ -120,8 +124,12 @@ Snapshot Diff:
|
|||||||
</th>
|
</th>
|
||||||
<th
|
<th
|
||||||
colspan="1"
|
colspan="1"
|
||||||
@@ -91,36 +91,36 @@
|
style="cursor: pointer;"
|
||||||
>
|
@@ -71,26 +71,26 @@
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- firstName: derek
|
- firstName: derek
|
||||||
+ firstName: tanner
|
+ firstName: tanner
|
||||||
@ -148,8 +156,13 @@ Snapshot Diff:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -159,36 +159,36 @@
|
<td>
|
||||||
>
|
firstName: joe
|
||||||
|
@@ -111,26 +111,26 @@
|
||||||
|
progress: 10
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
- firstName: tanner
|
- firstName: tanner
|
||||||
+ firstName: derek
|
+ firstName: derek
|
||||||
|
|||||||
@ -305,6 +305,7 @@ function isReactComponent(component) {
|
|||||||
|
|
||||||
export const mergeProps = (...groups) => {
|
export const mergeProps = (...groups) => {
|
||||||
let props = {}
|
let props = {}
|
||||||
|
|
||||||
groups.forEach(({ style = {}, className, ...rest } = {}) => {
|
groups.forEach(({ style = {}, className, ...rest } = {}) => {
|
||||||
props = {
|
props = {
|
||||||
...props,
|
...props,
|
||||||
@ -316,9 +317,11 @@ export const mergeProps = (...groups) => {
|
|||||||
className: [props.className, className].filter(Boolean).join(' '),
|
className: [props.className, className].filter(Boolean).join(' '),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (props.className === '') {
|
if (props.className === '') {
|
||||||
delete props.className
|
delete props.className
|
||||||
}
|
}
|
||||||
|
|
||||||
return props
|
return props
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user