Skip to content

Commit

Permalink
[fix] fix node property form render error
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnkwlp committed Apr 24, 2022
1 parent 30b53b8 commit 98a5235
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 13 deletions.
52 changes: 52 additions & 0 deletions .gitci/release-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version-resolver:
major:
commits:
- "Major"
- "[break changes]"
labels:
- "Versioning - major"
minor:
commits:
- "[feat]"
labels:
- "Versioning - Minor"
patch:
commits:
- "[fix]"
- "[fix bugs]"
labels:
- "Versioning - Patch"
default: patch

categories:
- title: "🌈 Breaking Changes"
labels:
- "Feature"
commits:
- "[break]"
- title: "🚀 Features"
labels:
- "Feature"
commits:
- "[feat]"
- title: "🐛 Bug Fixes"
labels:
- "Bug - Fixed"
- "Fix"
commits:
- "[fix]"
- "[fix bugs]"
- title: "📖 Documentation"
labels:
- "Documentation"
commits:
- "[docs]"
- title: "🧰 Maintenance"
labels:
- "Chore"
- "Maintenance"

template: |
## Changes
Contributors: $CONTRIBUTORS
$CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ElsaEFJsonValueConverter<TModel> : ValueConverter<TModel, string>
ContractResolver = new CamelCasePropertyNamesContractResolver() { NamingStrategy = new CamelCaseNamingStrategy(false, false) },
NullValueHandling = NullValueHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
TypeNameHandling = TypeNameHandling.Auto,
TypeNameHandling = TypeNameHandling.None,
};

static ElsaEFJsonValueConverter()
Expand Down
25 changes: 13 additions & 12 deletions src/Passingwind.ElsaDesigner/src/pages/designer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,19 @@ const Index: React.FC = () => {
if (item.expressions?.[syntax]) {
const expressionValue = item.expressions[syntax];
item.value = expressionValue;
//
// if (
// syntax == 'Literal' &&
// (item.valueType == 'object' || item.valueType == 'array')
// ) {
// if (
// (expressionValue.startsWith('{') && expressionValue.endsWith('}')) ||
// (expressionValue.startsWith('[') && expressionValue.endsWith(']'))
// ) {
// item.value = JSON.parse(expressionValue);
// }
// }
const property = nodeType.inputProperties?.find((x) => x.name == item.name);

if (
syntax == 'Literal' &&
(property?.uiHint == 'check-list' || property?.uiHint == 'multi-text')
) {
if (
(expressionValue.startsWith('{') && expressionValue.endsWith('}')) ||
(expressionValue.startsWith('[') && expressionValue.endsWith(']'))
) {
item.value = JSON.parse(expressionValue);
}
}
}

nodeData.props[item.name] = {
Expand Down

0 comments on commit 98a5235

Please sign in to comment.