From 8937d756513cd918371664aad25a8a9fa41878d1 Mon Sep 17 00:00:00 2001 From: 0x85FB9C51 <77808164+0x85FB9C51@users.noreply.github.com> Date: Mon, 21 Jun 2021 16:40:25 -0400 Subject: fixed bug pertaining to quotes --- src/client/views/collections/CollectionSchemaCells.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 { 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 -- cgit v1.2.3-70-g09d2