Skip to content

Commit

Permalink
[WIP] adjust JS for names of properties and relations
Browse files Browse the repository at this point in the history
  • Loading branch information
DDEV User committed Apr 4, 2024
1 parent 0ddc058 commit 60191f6
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 4,441 deletions.
6 changes: 4 additions & 2 deletions Build/Sources/components/ReactFlow/CustomModelNode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ export const CustomModelNode = (props) => {
identifier="propertyName"
initialValue={property.name}
onChange={(value) => {
updateProperty(index, "name", value.toLowerCase());
value = value.replace(/(^|_)./g, s => s.slice(-1).toUpperCase());
updateProperty(index, "name", value.charAt(0).toLowerCase() + value.slice(1));
}}
/>
<SelectComponent
Expand Down Expand Up @@ -811,7 +812,8 @@ export const CustomModelNode = (props) => {
initialValue={relation.relationName}
identifier="relationName"
onChange={(value) => {
updateRelation(index, "relationName", value);
value = value.replace(/(^|_)./g, s => s.slice(-1).toUpperCase());
updateProperty(index, "name", value.charAt(0).toLowerCase() + value.slice(1));
}}
/>
<SelectComponent
Expand Down
Loading

0 comments on commit 60191f6

Please sign in to comment.