From 446344691361bffc2b5a7ab51b411275b731b107 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 1 Oct 2018 13:28:25 -0500 Subject: [PATCH] prevent License column from wrapping ref #432 --- .../modules/home/components/TagGroup.tsx | 2 +- .../components/listsTable/columns/Languages.tsx | 2 +- .../components/listsTable/columns/License.tsx | 8 +++++--- .../components/listsTable/columns/Maintainers.tsx | 2 +- .../components/listsTable/columns/Software.tsx | 15 +++++++++------ .../home/components/listsTable/columns/Tags.tsx | 4 +--- .../home/components/listsTable/listsTable.css | 2 +- 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/TagGroup.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/TagGroup.tsx index 79698a849..ef368a575 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/TagGroup.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/TagGroup.tsx @@ -8,7 +8,7 @@ interface IProps { export const TagGroup = (props: IProps) => props.tags && props.tags.length > 0 - ?
+ ?
{props.tags.map((t: ITag, i: number) => )}
: null; diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Languages.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Languages.tsx index 3e12e26e4..6864b9e89 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Languages.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Languages.tsx @@ -57,7 +57,7 @@ const sortMethod = (a: number[], b: number[], languages: ILanguage[]) => { const Cell = (languageIds: number[], languages: ILanguage[]) => languageIds - ?
+ ?
{languageIds.map((id: number, i: number) => { const language = languages.filter((l: ILanguage) => l.id === id)[0]; return Filter({ onChange, filter }, licenses), sortMethod: (a: number, b: number) => sortMethod(a, b, licenses), Cell: (c: any) => Cell(c.value, licenses), - width: 140, + width: 75, show: columnVisibility.filter((c: IColumnVisibility) => c.column === "License")[0].visible } as Column); @@ -59,8 +59,10 @@ const sortMethod = (a: number, b: number, licenses: ILicense[]) => { const Cell = (licenseId: number, licenses: ILicense[]) => { const license = licenses.filter((l: ILicense) => licenseId === l.id)[0]; return license - ?
- {license.descriptionUrl ? {license.name} : license.name} + ?
+ + {license.descriptionUrl ? {license.name} : license.name} +
: null; }; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Maintainers.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Maintainers.tsx index 1fb36845e..c052275de 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Maintainers.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Maintainers.tsx @@ -58,7 +58,7 @@ const sortMethod = (a: number[], b: number[], maintainers: IMaintainer[]) => { const Cell = (maintainerIds: number[], maintainers: IMaintainer[]) => maintainerIds - ?
+ ?
{maintainers.filter((m: IMaintainer) => maintainerIds.indexOf(m.id) > -1) .map((m: IMaintainer, i: number) => { return m.homeUrl diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Software.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Software.tsx index 865c81a40..485af2731 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Software.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Software.tsx @@ -62,10 +62,13 @@ const sortMethod = (a: number, b: number, software: ISoftware[]) => { const Cell = (listSyntaxId: number, software: ISoftware[]) => listSyntaxId - ? software.filter((s: ISoftware) => s.syntaxIds.indexOf(listSyntaxId) > -1) - .map((s: ISoftware, i: number) => s.homeUrl - ? - - - : ) + ?
+ {software.filter((s: ISoftware) => s.syntaxIds.indexOf(listSyntaxId) > -1) + .map((s: ISoftware, i: number) => + s.homeUrl + ? + + + : )} +
: null; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Tags.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Tags.tsx index c0268fe6a..c5cce762c 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Tags.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/Tags.tsx @@ -58,7 +58,5 @@ const sortMethod = (a: number[], b: number[], tags: ITag[]): any => { const Cell = (tagIds: number[], tags: ITag[]) => tagIds - ?
- tagIds.indexOf(t.id) > -1)}/> -
+ ? tagIds.indexOf(t.id) > -1)}/> : null; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/listsTable.css b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/listsTable.css index a905741ea..0436aa6bf 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/listsTable.css +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/listsTable.css @@ -7,7 +7,7 @@ div.rt-tbody, div.rt-thead.-filters, div.rt-thead.-header { min-width: 320px !important; } -.fl-tag-container { +.fl-wrap-cell { line-height: 1; white-space: normal; } \ No newline at end of file