aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index b1dc82ce2..045995faa 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -248,7 +248,13 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
if (isNaN(inputAsNum)) {
// if it's not a number, it's a string, and should be processed as such
//TODO: maake the input not "thing" when it is being edited
- const inputscript = value.substring(value.startsWith("=") ? 1 : 0);
+ // strips the string of quotes when it is edited to prevent quotes form being added to the text automatically
+ // after each edit
+ let valueSansQuotes = value;
+ if (this._isEditing) {
+ valueSansQuotes = valueSansQuotes.substring(1, valueSansQuotes.length - 1);
+ }
+ const inputscript = valueSansQuotes.substring(value.startsWith("=") ? 1 : 0);
let inputAsString = '"';
// escape any quotes in the string
//TODO: remove this note to self: when the type is number, it behaves liek I want any to behave