diff options
author | bob <bcz@cs.brown.edu> | 2019-10-22 08:53:29 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-10-22 08:53:29 -0400 |
commit | e38afa49541fd0113f6f6b820c3bad769144f918 (patch) | |
tree | 21224a02b392c3279b42234f03e1c93621485555 /src/client/views/CollectionLinearView.tsx | |
parent | fd3d2b4ea1c8950c9ac9a15b053b285c8bdec96b (diff) |
fixed small run-time warnings about keys
Diffstat (limited to 'src/client/views/CollectionLinearView.tsx')
-rw-r--r-- | src/client/views/CollectionLinearView.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/CollectionLinearView.tsx b/src/client/views/CollectionLinearView.tsx index 31a518a6c..7c6d33d36 100644 --- a/src/client/views/CollectionLinearView.tsx +++ b/src/client/views/CollectionLinearView.tsx @@ -12,6 +12,7 @@ import { CollectionViewType } from './collections/CollectionView'; import { CollectionSubView } from './collections/CollectionSubView'; import { DocumentView } from './nodes/DocumentView'; import { documentSchema } from '../../new_fields/documentSchemas'; +import { Id } from '../../new_fields/FieldSymbols'; type LinearDocument = makeInterface<[typeof documentSchema,]>; @@ -67,7 +68,7 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { let scalingContent = nested ? 1 : this.dimension() / (this._spacing + nativeWidth); let scalingBox = nested ? 1 : this.dimension() / nativeWidth; let deltaSize = nativeWidth * scalingBox - nativeWidth * scalingContent; - return <div className={`collectionLinearView-docBtn` + (pair.layout.onClick || pair.layout.onDragStart ? "-scalable" : "")} key={StrCast(pair.layout.title)} ref={dref} + return <div className={`collectionLinearView-docBtn` + (pair.layout.onClick || pair.layout.onDragStart ? "-scalable" : "")} key={pair.layout[Id]} ref={dref} style={{ width: nested ? pair.layout[WidthSym]() : this.dimension(), height: nested && pair.layout.isExpanded ? pair.layout[HeightSym]() : this.dimension(), |