Skip to content
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

Entfernt Notwendigkeit für Default Condition #5

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@5minds/node-red-dashboard-2-processcube-dynamic-form",
"version": "1.0.21",
"version": "1.0.22",
"description": "The ui component for the ProcessCube dynamic-form",
"keywords": [
"processcube",
Expand Down
1 change: 1 addition & 0 deletions ui/components/UIDynamicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export default {
}
},
checkCondition(condition) {
if (condition == '') return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist das hier immer empty string oder kann es auch null oder undefined sein?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das ist halt ein string input Feld. An der Stelle ist die Condition immer ein String. Wenn man natürlich sowas wie 'null' oder 'undefined' als string bei der Condition angibt könnte es beim auswerten Probleme geben aber an der Stelle erstmal nicht.

try {
const func = Function('fields', 'userTask', 'msg', '"use strict"; return (' + condition + ')');
const result = func(this.formData, this.taskInput, this.msg);
Expand Down
2 changes: 1 addition & 1 deletion ui/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/* Exports of all of the components in this node */
export { default as UIDynamicForm } from './components/UIDynamicForm.vue'
export { default as UIDynamicForm } from './components/UIDynamicForm.vue';