aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author0x85FB9C51 <77808164+0x85FB9C51@users.noreply.github.com>2021-06-21 16:40:25 -0400
committer0x85FB9C51 <77808164+0x85FB9C51@users.noreply.github.com>2021-06-21 16:40:25 -0400
commit8937d756513cd918371664aad25a8a9fa41878d1 (patch)
tree235eecded4cedabf810a18fb79ff53685c30092b /src
parent1cf3f477c3066a59158b6a26b5e3be2148e92574 (diff)
fixed bug pertaining to quotes
Diffstat (limited to 'src')
-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