docs: remove obsolete snapshot and fix custom filter demo

This commit is contained in:
Wei Zhu 2018-07-02 21:41:14 +08:00
parent 0f2fea2d78
commit d4c95e6f18
2 changed files with 2 additions and 287 deletions

View File

@ -8910,291 +8910,6 @@ exports[`renders ./components/table/demo/nested-table.md correctly 1`] = `
</div>
`;
exports[`renders ./components/table/demo/override-filter-panel.md correctly 1`] = `
<div
class="ant-table-wrapper"
>
<div
class="ant-spin-nested-loading"
>
<div
class="ant-spin-container"
>
<div
class="ant-table ant-table-default ant-table-scroll-position-left"
>
<div
class="ant-table-content"
>
<div
class="ant-table-body"
>
<table
class=""
>
<colgroup>
<col />
<col />
<col />
<col />
</colgroup>
<thead
class="ant-table-thead"
>
<tr>
<th
class=""
>
<span>
Name
</span>
</th>
<th
class="ant-table-column-has-filters"
>
<span>
Age
<i
class="anticon anticon-filter ant-dropdown-trigger"
title="Filter menu"
/>
</span>
</th>
<th
class=""
>
<span>
Address
</span>
</th>
<th
class=""
>
<span>
Action
</span>
</th>
</tr>
</thead>
<tbody
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
>
<td
class=""
>
<span
class="ant-table-row-indent indent-level-0"
style="padding-left:0px"
/>
<a
href="javascript:;"
>
John Brown
</a>
</td>
<td
class="ant-table-column-has-filters"
>
32
</td>
<td
class=""
>
New York No. 1 Lake Park
</td>
<td
class=""
>
<span>
<a
href="javascript:;"
>
Action 一 John Brown
</a>
<div
class="ant-divider ant-divider-vertical"
/>
<a
href="javascript:;"
>
Delete
</a>
<div
class="ant-divider ant-divider-vertical"
/>
<a
class="ant-dropdown-link"
href="javascript:;"
>
More actions
<i
class="anticon anticon-down"
/>
</a>
</span>
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
>
<td
class=""
>
<span
class="ant-table-row-indent indent-level-0"
style="padding-left:0px"
/>
<a
href="javascript:;"
>
Jim Green
</a>
</td>
<td
class="ant-table-column-has-filters"
>
42
</td>
<td
class=""
>
London No. 1 Lake Park
</td>
<td
class=""
>
<span>
<a
href="javascript:;"
>
Action 一 Jim Green
</a>
<div
class="ant-divider ant-divider-vertical"
/>
<a
href="javascript:;"
>
Delete
</a>
<div
class="ant-divider ant-divider-vertical"
/>
<a
class="ant-dropdown-link"
href="javascript:;"
>
More actions
<i
class="anticon anticon-down"
/>
</a>
</span>
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
>
<td
class=""
>
<span
class="ant-table-row-indent indent-level-0"
style="padding-left:0px"
/>
<a
href="javascript:;"
>
Joe Black
</a>
</td>
<td
class="ant-table-column-has-filters"
>
32
</td>
<td
class=""
>
Sidney No. 1 Lake Park
</td>
<td
class=""
>
<span>
<a
href="javascript:;"
>
Action 一 Joe Black
</a>
<div
class="ant-divider ant-divider-vertical"
/>
<a
href="javascript:;"
>
Delete
</a>
<div
class="ant-divider ant-divider-vertical"
/>
<a
class="ant-dropdown-link"
href="javascript:;"
>
More actions
<i
class="anticon anticon-down"
/>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<ul
class="ant-pagination ant-table-pagination"
unselectable="unselectable"
>
<li
aria-disabled="true"
class="ant-pagination-disabled ant-pagination-prev"
title="Previous Page"
>
<a
class="ant-pagination-item-link"
/>
</li>
<li
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
tabindex="0"
title="1"
>
<a>
1
</a>
</li>
<li
aria-disabled="true"
class="ant-pagination-disabled ant-pagination-next"
title="Next Page"
>
<a
class="ant-pagination-item-link"
/>
</li>
</ul>
</div>
</div>
</div>
`;
exports[`renders ./components/table/demo/reset-filter.md correctly 1`] = `
<div>
<div

View File

@ -82,14 +82,14 @@ class App extends React.Component {
},
render: (text) => {
const { searchText } = this.state;
return (
return searchText ? (
<span>
{text.split(new RegExp(`(?<=${searchText})|(?=${searchText})`, 'i')).map((fragment, i) => (
fragment.toLowerCase() === searchText.toLowerCase()
? <span key={i} className="highlight">{fragment}</span> : fragment // eslint-disable-line
))}
</span>
);
) : text;
},
}, {
title: 'Age',