mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
limit table cells from wrapping more than 2 lines
This commit is contained in:
parent
5906af8454
commit
488b85855f
3 changed files with 22 additions and 3 deletions
|
|
@ -0,0 +1,12 @@
|
|||
/* limit table cells from wrapping more than 2 lines */
|
||||
/* https://stackoverflow.com/a/13924997/2343739 */
|
||||
/* https://stackoverflow.com/a/22042054/2343739 */
|
||||
td > div {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
line-height: 1.5;
|
||||
max-height: 3em;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ import { Table } from 'antd';
|
|||
import * as React from "react";
|
||||
import { SubscribeButton } from '../../shared/';
|
||||
import { nameof } from '../../utils';
|
||||
import './AllListsTable.css';
|
||||
import { List } from './List';
|
||||
|
||||
interface State {
|
||||
|
|
@ -34,15 +35,17 @@ export class AllListsTable extends React.Component<{}, State> {
|
|||
title="Name"
|
||||
dataIndex={nameof<List>("name")}
|
||||
width={250}
|
||||
fixed="left" />
|
||||
fixed="left"
|
||||
render={(text: string) => <div>{text}</div>} />
|
||||
<Table.Column<List>
|
||||
title="Description"
|
||||
dataIndex={nameof<List>("description")} />
|
||||
dataIndex={nameof<List>("description")}
|
||||
render={(text: string) => <div>{text}</div>} />
|
||||
<Table.Column<List> title="Subscribe"
|
||||
dataIndex={nameof<List>("viewUrl")}
|
||||
width={123}
|
||||
fixed="right"
|
||||
render={(text: string, record: List, index: number) => <SubscribeButton key={index} viewUrl={text} viewUrlMirrors={record.viewUrlMirrors} name={record.name} />}
|
||||
render={(text: string, record: List, index: number) => <div><SubscribeButton key={index} viewUrl={text} viewUrlMirrors={record.viewUrlMirrors} name={record.name} /></div>}
|
||||
/>
|
||||
</Table>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,3 +3,7 @@
|
|||
.ant-dropdown-menu-submenu-title > a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
span {
|
||||
z-index: 1000000;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue