diff --git a/src/FilterLists.Web.V2/src/components/ListDetailsButton.tsx b/src/FilterLists.Web.V2/src/components/ListInfoButton.tsx similarity index 69% rename from src/FilterLists.Web.V2/src/components/ListDetailsButton.tsx rename to src/FilterLists.Web.V2/src/components/ListInfoButton.tsx index df308e8bd..efa70a457 100644 --- a/src/FilterLists.Web.V2/src/components/ListDetailsButton.tsx +++ b/src/FilterLists.Web.V2/src/components/ListInfoButton.tsx @@ -8,12 +8,12 @@ interface Props { list: List; }; -export const ListDetailsButton = (props: RouteComponentProps & Props) => +export const ListInfoButton = (props: RouteComponentProps & Props) => ; \ No newline at end of file + : props.history.push(`/lists/${props.list.id}`)} > + Info + ; \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/components/ListDetailsDrawer.tsx b/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx similarity index 94% rename from src/FilterLists.Web.V2/src/components/ListDetailsDrawer.tsx rename to src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx index 9a8fb3d43..58d7788d8 100644 --- a/src/FilterLists.Web.V2/src/components/ListDetailsDrawer.tsx +++ b/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx @@ -22,7 +22,7 @@ interface State { baseDocumentTitle: string; } -export class ListDetailsDrawer extends React.Component { +export class ListInfoDrawer extends React.Component { constructor(props: any) { super(props); this.state = { @@ -30,6 +30,10 @@ export class ListDetailsDrawer extends React.Component { languages: [], tags: [], pageSize: 0, - pageSizeOptions: [], isNarrowWindow: false }; this.updatePageSize = this.updatePageSize.bind(this); @@ -60,10 +58,8 @@ export class ListsTable extends React.Component { } private updatePageSize() { - const pageSize = Math.floor((window.innerHeight - 211.5) / 56); this.setState({ - pageSize: pageSize, - pageSizeOptions: [pageSize, 200, 2000].sort((a, b) => a - b).map(String), + pageSize: Math.floor((window.innerHeight - 211.5) / 56), isNarrowWindow: window.innerWidth < 576 ? true : false }); } @@ -78,18 +74,17 @@ export class ListsTable extends React.Component { size="small" pagination={{ size: "small", + simple: true, style: { float: "left" }, - pageSize: this.state.pageSize, - showSizeChanger: true, - pageSizeOptions: this.state.pageSizeOptions + pageSize: this.state.pageSize }} scroll={{ x: this.state.isNarrowWindow ? undefined : 1200 }}> - title="Details" + title="Info" dataIndex={nameof("viewUrl")} className={styles.nogrow} fixed="left" - render={(_text: string, record: List) => } /> + render={(_text: string, record: List) => } /> title="Name" dataIndex={nameof("name")} @@ -141,7 +136,7 @@ export class ListsTable extends React.Component { { const list = this.state.lists.find(l => l.id === +props.match.params.id); return list - ? + ? : this.state.lists && this.state.lists.length && }} />