aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-10-01 10:12:50 -0400
committerbob <bcz@cs.brown.edu>2019-10-01 10:12:50 -0400
commitfaaff9fe8aab3bd5d116eab8bd85198a0756fe30 (patch)
treebbfcaf95e462b298aa7645049443ad9932f780a8 /src/client/views/collections/CollectionSchemaView.tsx
parent9e1234abe64d289927122ad641e3bcaf0b9eaf6e (diff)
fixed issues with pdf loading and layout.
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 59cce7386..853808335 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -303,21 +303,17 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
this.props.Document.textwrappedSchemaRows = new List<string>(textWrappedRows);
}
- @computed get resized(): { "id": string, "value": number }[] {
+ @computed get resized(): { id: string, value: number }[] {
return this.columns.reduce((resized, shf) => {
- if (shf.width > -1) {
- resized.push({ "id": shf.heading, "value": shf.width });
- }
+ (shf.width > -1) && resized.push({ id: shf.heading, value: shf.width });
return resized;
- }, [] as { "id": string, "value": number }[]);
+ }, [] as { id: string, value: number }[]);
}
- @computed get sorted(): { id: string, desc: boolean }[] {
+ @computed get sorted(): { id: string, desc?: true }[] {
return this.columns.reduce((sorted, shf) => {
- if (shf.desc) {
- sorted.push({ "id": shf.heading, "desc": shf.desc });
- }
+ shf.desc && sorted.push({ id: shf.heading, desc: shf.desc });
return sorted;
- }, [] as { id: string, desc: boolean }[]);
+ }, [] as { id: string, desc?: true }[]);
}
@computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); }