aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/EditableView.tsx4
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx5
-rw-r--r--src/client/views/collections/collectionSchema/SchemaTableCell.tsx8
3 files changed, 7 insertions, 10 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 14af8febb..f94f4be86 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -323,7 +323,9 @@ export class EditableView extends ObservableReactComponent<EditableProps> {
{this.renderEditor()}
</div>
) : (
- this.renderEditor()
+ <div >
+ {this.renderEditor()}
+ </div>
);
}
setTimeout(() => this._props.autosuggestProps?.resetValue());
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 4fc89488d..ba2d2a764 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -534,11 +534,6 @@ export class CollectionSchemaView extends CollectionSubView() {
if (!this._cellHighlightColors.has(cell)) {this._cellHighlightColors.set(cell, `solid 2px ${randomRGBColor()}`)}
cell.style.border = this._cellHighlightColors.get(cell);
});
- // const cellsToRemove = [];
- // this._highlightedCells.forEach(cell => !cellsToHighlight.includes(cell) && cellsToRemove.push(cell));
- // this._highlightedCells = this._highlightedCells.filter(cell => cellsToHighlight.includes(cell));
- // const cellsToAdd = cellsToHighlight.filter(cell => !this._highlightedCells.includes(cell));
- // this._highlightedCells = this._highlightedCells.concat(cellsToAdd);
}
@action
diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
index 50ec2f978..26dc9c3c2 100644
--- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
@@ -154,10 +154,10 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro
const idPattern = /idToDoc\((.*?)\)/g;
let modField = field.slice();
let matches;
- let results = new Map<string, string>();
- while ((matches = idPattern.exec(field)) !== null) {results.set(matches[0], matches[1].replace(/"/g, '')); }
- results.forEach((id, funcId) => {modField = modField.replace(funcId, 'd' + (DocumentView.getDocViewIndex(IdToDoc(id))).toString());})
- if (!modField) modField = '';
+ let results = new Array<[id: string, func: string]>();
+ while ((matches = idPattern.exec(field)) !== null) {results.push([matches[0], matches[1].replace(/"/g, '')]); }
+ results.forEach((idFuncPair) => {modField = modField.replace(idFuncPair[0], 'd' + (DocumentView.getDocViewIndex(IdToDoc(idFuncPair[1]))).toString());})
+ if (modField.charAt(modField.length - 1) === ';') modField = modField.substring(0, modField.length - 1);
return modField;
}