prevent License column from wrapping

ref #432
This commit is contained in:
Collin M. Barrett 2018-10-01 13:28:25 -05:00
parent fda189eef2
commit 4463446913
7 changed files with 19 additions and 16 deletions

View file

@ -8,7 +8,7 @@ interface IProps {
export const TagGroup = (props: IProps) =>
props.tags && props.tags.length > 0
? <div className="fl-tag-container">
? <div className="fl-wrap-cell">
{props.tags.map((t: ITag, i: number) => <Tag tag={t} key={i}/>)}
</div>
: null;

View file

@ -57,7 +57,7 @@ const sortMethod = (a: number[], b: number[], languages: ILanguage[]) => {
const Cell = (languageIds: number[], languages: ILanguage[]) =>
languageIds
? <div className="fl-tag-container">
? <div className="fl-wrap-cell">
{languageIds.map((id: number, i: number) => {
const language = languages.filter((l: ILanguage) => l.id === id)[0];
return <span className="badge badge-secondary"

View file

@ -11,7 +11,7 @@ export const License = (columnVisibility: IColumnVisibility[], licenses: ILicens
Filter: ({ filter, onChange }: any) => 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
? <div className="fl-tag-container">
{license.descriptionUrl ? <a href={license.descriptionUrl}>{license.name}</a> : license.name}
? <div>
<span title={license.name}>
{license.descriptionUrl ? <a href={license.descriptionUrl}>{license.name}</a> : license.name}
</span>
</div>
: null;
};

View file

@ -58,7 +58,7 @@ const sortMethod = (a: number[], b: number[], maintainers: IMaintainer[]) => {
const Cell = (maintainerIds: number[], maintainers: IMaintainer[]) =>
maintainerIds
? <div className="fl-tag-container">
? <div className="fl-wrap-cell">
{maintainers.filter((m: IMaintainer) => maintainerIds.indexOf(m.id) > -1)
.map((m: IMaintainer, i: number) => {
return m.homeUrl

View file

@ -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
? <a href={s.homeUrl} key={i}>
<SoftwareIcon id={s.id}/>
</a>
: <SoftwareIcon id={s.id} key={i}/>)
? <div className="fl-wrap-cell">
{software.filter((s: ISoftware) => s.syntaxIds.indexOf(listSyntaxId) > -1)
.map((s: ISoftware, i: number) =>
s.homeUrl
? <a href={s.homeUrl} key={i}>
<SoftwareIcon id={s.id}/>
</a>
: <SoftwareIcon id={s.id} key={i}/>)}
</div>
: null;

View file

@ -58,7 +58,5 @@ const sortMethod = (a: number[], b: number[], tags: ITag[]): any => {
const Cell = (tagIds: number[], tags: ITag[]) =>
tagIds
? <div className="fl-tag-container">
<TagGroup tags={tags.filter((t: ITag) => tagIds.indexOf(t.id) > -1)}/>
</div>
? <TagGroup tags={tags.filter((t: ITag) => tagIds.indexOf(t.id) > -1)}/>
: null;

View file

@ -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;
}