aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ComparisonBox.tsx
diff options
context:
space:
mode:
authoralyssaf16 <alyssa_feinberg@brown.edu>2024-09-29 15:56:04 -0400
committeralyssaf16 <alyssa_feinberg@brown.edu>2024-09-29 15:56:04 -0400
commitd9389cf288829bc8dd8c26a91693b1cfc4edacfb (patch)
tree6c4e0e353bd2bbfe14ee7fb382ea9e29a5fcaafa /src/client/views/nodes/ComparisonBox.tsx
parentef2a1037a418ad9fa35d6c60feba914d828d5b84 (diff)
parente9c9476ad3958b89843057dc4287ced180ee04c4 (diff)
Merge branch 'alyssa-starter' of https://github.com/brown-dash/Dash-Web into alyssa-starter
Diffstat (limited to 'src/client/views/nodes/ComparisonBox.tsx')
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index df127f0d5..8fbcb74cb 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -122,7 +122,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
<FontAwesomeIcon icon="lightbulb" size="xl" />
</div>
</Tooltip>
- {DocCast(this.Document.embedContainer).type_collection === 'carousel' ? null : (
+ {DocCast(this.Document.embedContainer)?.type_collection === CollectionViewType.Carousel ? null : (
<div>
<Tooltip title={<div>Create a flashcard pile</div>}>
<div style={{ position: 'absolute', bottom: '3px', right: '74px', cursor: 'pointer' }} onPointerDown={e => this.createFlashcardPile([this.Document], false)}>
@@ -697,6 +697,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
<DocumentView
// eslint-disable-next-line react/jsx-props-no-spreading
{...this._props}
+ showTags={undefined}
fitWidth={undefined}
ignoreUsePath={layoutString ? true : undefined}
renderDepth={this.props.renderDepth + 1}
@@ -742,13 +743,13 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
// add text box to each side when comparison box is first created
if (!this.dataDoc[this.fieldKey + '_0'] && !this._isEmpty) {
const dataSplit = StrCast(this.dataDoc.data).includes('Keyword: ') ? StrCast(this.dataDoc.data).split('Keyword: ') : StrCast(this.dataDoc.data).split('Answer: ');
- const newDoc = Docs.Create.TextDocument(dataSplit[1]);
+ const newDoc = Docs.Create.TextDocument(dataSplit[1], { _layout_autoHeight: true });
this.addDoc(newDoc, this.fieldKey + '_0');
}
if (!this.dataDoc[this.fieldKey + '_1'] && !this._isEmpty) {
const dataSplit = StrCast(this.dataDoc.data).includes('Keyword: ') ? StrCast(this.dataDoc.data).split('Keyword: ') : StrCast(this.dataDoc.data).split('Answer: ');
- const newDoc = Docs.Create.TextDocument(dataSplit[0]);
+ const newDoc = Docs.Create.TextDocument(dataSplit[0], { _layout_autoHeight: true });
this.addDoc(newDoc, this.fieldKey + '_1');
}