aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaCells.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-19 22:39:51 -0400
committerbobzel <zzzman@gmail.com>2020-08-19 22:39:51 -0400
commitda8901bef2d4a0362354c69fe486076a67f8efc4 (patch)
tree35825255e04ba892b570a614a6d4449d8d87d659 /src/client/views/collections/CollectionSchemaCells.tsx
parent5b7d51d47a967e679d17560771efe71522ada13a (diff)
cleaning lint errors
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index 626ddf288..ea786800c 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -779,16 +779,9 @@ export class CollectionSchemaListCell extends CollectionSchemaCell {
@observable private _selectedNum = 0;
@action
- toggleOpened(open: boolean) {
- this._opened = open;
- }
-
- @action
onSetValue = (value: string) => {
- this._text = value;
-
// change if its a document
- this._optionsList[this._selectedNum] = this._text;
+ this._optionsList[this._selectedNum] = this._text = value;
(this.prop.Document[this.prop.fieldKey] as List<any>).splice(this._selectedNum, 1, value);
}
@@ -854,7 +847,7 @@ export class CollectionSchemaListCell extends CollectionSchemaCell {
<div className="collectionSchemaView-cellContents" key={this._document[Id]} ref={reference}>
<div className="collectionSchemaView-dropDownWrapper">
<button type="button" className="collectionSchemaView-dropdownButton" style={{ right: "length", position: "relative" }}
- onClick={e => this.toggleOpened(!this._opened)} >
+ onClick={action(e => this._opened = !this._opened)} >
<FontAwesomeIcon icon={this._opened ? "caret-up" : "caret-down"} size="lg" />
</button>
<div className="collectionSchemaView-dropdownText"> {link ? plainText : textarea} </div>