Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/react-tools/react-table

  • Loading branch information...
tannerlinsley committed Nov 5, 2019
2 parents 1d0c6f5 + 3b03ea3 commit a5e96531655300dd9559a396d58e8b460c878ea6
@@ -66,14 +66,14 @@ In case you would need to have both v6 and v7 in one app during the migration pr

## Sponsors

**React Table v7** is being built and maintained by me, @tannerlinsley and I am always in need of more Patreon support to keep this project afloat. If you would like to contribute to my Patreon goal for v7 and beyond, [visit my Patreon and help me out!](https://github.com/sponsors/tannerlinsley/)
This library is being built and maintained by me, @tannerlinsley and I am always in need of more support to keep this project afloat. If you would like to get additional support, add your logo or name on this README, or simply just contribute to my open source Sponsorship goal, [visit my Github Sponsors page!](https://github.com/sponsors/tannerlinsley/)

<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://github.com/sponsors/tannerlinsley" target="_blank">
<img width='230' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/diamond.png">
<img width='150' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/diamond.png">
</a>
</td>
<td align="center" valign="middle">
@@ -90,17 +90,17 @@ In case you would need to have both v6 and v7 in one app during the migration pr
<tr>
<td align="center" valign="middle">
<a href="https://github.com/sponsors/tannerlinsley/" target="_blank">
<img width='200' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/platinum.png">
<img width='150' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/platinum.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://tryretool.com/?utm_source=sponsor&utm_campaign=react_table" target="_blank">
<img width='350' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/sponsor-retool.png">
<img width='225' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/sponsor-retool.png">
</a>
</td>
<td align="center" valign="middle">
<a href="http://bjntech.com/index.html?utm_campaign=react_table" target="_blank">
<img width='250' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/sponsor-bjn.png">
<img width='225' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/sponsor-bjn.png">
</a>
</td>
<td align="center" valign="middle">
@@ -117,17 +117,17 @@ In case you would need to have both v6 and v7 in one app during the migration pr
<tr>
<td align="center" valign="middle">
<a href="https://github.com/sponsors/tannerlinsley/" target="_blank">
<img width='200' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/gold.png">
<img width='150' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/gold.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://nozzle.io" target="_blank">
<img width='230' src="https://nozzle.io/img/logo-blue.png">
<img width='225' src="https://nozzle.io/img/logo-blue.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://zappi.io/web/" target="_blank">
<img width='230' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/sponsor-zappi.png">
<img width='225' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/sponsor-zappi.png">
</a>
</td>
<td align="center" valign="middle">
@@ -144,7 +144,7 @@ In case you would need to have both v6 and v7 in one app during the migration pr
<tr>
<td align="center" valign="middle">
<a href="https://github.com/sponsors/tannerlinsley/" target="_blank">
<img width='200' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/silver.png">
<img width='150' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/silver.png">
</a>
</td>
<td align="center" valign="middle">
@@ -161,12 +161,14 @@ In case you would need to have both v6 and v7 in one app during the migration pr
<tr>
<td valign="top">
<a href="https://github.com/sponsors/tannerlinsley/">
<img width='200' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/supporters.png" />
<img width='150' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/supporters.png" />
</a>
</td>
<td>
<div>Jon Eickmeier</div>
<div><a href="https://github.com/Shah-Sahab">Syed Hussain<a></div>
<ul>
<li>Jon Eickmeier</li>
<li><a href="https://github.com/Shah-Sahab">Syed Hussain<a></li>
</ul>
</td>
<td>
<a href="https://github.com/sponsors/tannerlinsley" target="_blank">
@@ -182,19 +184,21 @@ In case you would need to have both v6 and v7 in one app during the migration pr
<tr>
<td valign="top">
<a href="https://github.com/sponsors/tannerlinsley/">
<img width='200' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/fans.png" />
<img width='150' src="https://raw.githubusercontent.com/tannerlinsley/files/master/images/patreon/fans.png" />
</a>
</td>
<td>
<div>Sortmy.games</div>
<div>Hugo Meissner</div>
<div>Benoit Leger-Derville</div>
<div>Thomas Funk</div>
<div>Dan Houle</div>
<div>David Pickut</div>
<div>Jordan Soltman</div>
<div>Robert Tajnšek</div>
<div>Pekka Tapani</div>
<ul>
<li>Sortmy.games</li>
<li>Hugo Meissner</li>
<li>Benoit Leger-Derville</li>
<li>Thomas Funk</li>
<li>Dan Houle</li>
<li>David Pickut</li>
<li>Jordan Soltman</li>
<li>Robert Tajnšek</li>
<li>Pekka Tapani</li>
</ul>
</td>
<td>
<a href="https://github.com/sponsors/tannerlinsley" target="_blank">
@@ -159,12 +159,13 @@ export interface UseTableCellProps<D extends object> {

export type HeaderProps<D extends object> = TableInstance<D> & {
column: ColumnInstance<D>
} & Record<string, any>
}

export type CellProps<D extends object> = TableInstance<D> & {
column: ColumnInstance<D>
row: Row<D>
cell: Cell<D>
} & Record<string, any>
}

// NOTE: At least one of (id | accessor | Header as string) required
export interface Accessor<D extends object> {
@@ -2,169 +2,111 @@

exports[`renders a basic table 1`] = `
<DocumentFragment>
<table
class=""
>
<table>
<thead>
<tr
class=""
>
<tr>
<th
class=""
colspan="2"
>
Name
</th>
<th
class=""
colspan="4"
>
Info
</th>
</tr>
<tr
class=""
>
<tr>
<th
class=""
colspan="1"
>
First Name
</th>
<th
class=""
colspan="1"
>
Last Name
</th>
<th
class=""
colspan="1"
>
Age
</th>
<th
class=""
colspan="1"
>
Visits
</th>
<th
class=""
colspan="1"
>
Status
</th>
<th
class=""
colspan="1"
>
Profile Progress
</th>
</tr>
</thead>
<tbody
class=""
>
<tr
class=""
>
<td
class=""
>
<tbody>
<tr>
<td>
tanner
</td>
<td
class=""
>
<td>
linsley
</td>
<td
class=""
>
<td>
29
</td>
<td
class=""
>
<td>
100
</td>
<td
class=""
>
<td>
In Relationship
</td>
<td
class=""
>
<td>
50
</td>
</tr>
<tr
class=""
>
<td
class=""
>
<tr>
<td>
derek
</td>
<td
class=""
>
<td>
perkins
</td>
<td
class=""
>
<td>
40
</td>
<td
class=""
>
<td>
40
</td>
<td
class=""
>
<td>
Single
</td>
<td
class=""
>
<td>
80
</td>
</tr>
<tr
class=""
>
<td
class=""
>
<tr>
<td>
joe
</td>
<td
class=""
>
<td>
bergevin
</td>
<td
class=""
>
<td>
45
</td>
<td
class=""
>
<td>
20
</td>
<td
class=""
>
<td>
Complicated
</td>
<td
class=""
>
<td>
10
</td>
</tr>
@@ -122,7 +122,7 @@ export const useTable = (props, ...plugins) => {
[defaultColumn, userColumns]
)

// Get the flat list of all columns andllow hooks to decorate
// Get the flat list of all columns and allow hooks to decorate
// those columns (and trigger this memoization via deps)
let flatColumns = React.useMemo(() => {
if (process.env.NODE_ENV === 'development' && debug)
@@ -74,7 +74,6 @@ exports[`renders a table 1`] = `
</div>
</div>
<div
class=""
style="position: relative; width: 1400px;"
>
<div
@@ -73,9 +73,7 @@ exports[`renders a table 1`] = `
</div>
</div>
</div>
<div
class=""
>
<div>
<div
class="row"
style="display: flex; width: 1400px;"

0 comments on commit a5e9653

Please sign in to comment.
You can’t perform that action at this time.