-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloud): allow Number and Boolean custom properties #64
Conversation
e3beba1
to
bcefaa1
Compare
I think it would make sense to also implement the FEEL expression shortcut that we support for text fields, i.e. |
const validate = useCallback((value) => { | ||
if (isNumber(value) && value.toString().includes('e')) { | ||
return translate('Scientific Notation is disallowed'); | ||
} | ||
|
||
const defaultValidator = propertyValidator(translate, property); | ||
return defaultValidator(value); | ||
}, [ translate, property ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought initially that it doesn't work as supposed because the automatic conversion (which I love) kicked in:
Screen.Recording.2024-02-13.at.11.54.32.mov
src/cloud-element-templates/properties-panel/properties/CustomProperties/NumberProperty.js
Outdated
Show resolved
Hide resolved
I think that makes sense, but is not directly related to the element template feature. I created a follow-up issue in the properties-panel repo: bpmn-io/properties-panel#346 |
src/cloud-element-templates/properties-panel/properties/CustomProperties/BooleanProperty.js
Outdated
Show resolved
Hide resolved
src/cloud-element-templates/properties-panel/properties/CustomProperties/index.js
Outdated
Show resolved
Hide resolved
a2ad510
to
0105490
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff!
related to camunda/camunda-modeler#3622
Try it out with the "Number and Boolean" example template in the
npm start
preview environment.feel: optional
orfeel: static
is set in the templateOther Refactorings