avtryck-ui-for-p-red
Advanced tools
Comparing version 1.0.30 to 1.0.31
@@ -45,8 +45,8 @@ module.exports = { | ||
const id = component.properties.id.value || 'a_ui_form_' + Date.now() | ||
if (!component.properties.id.value) { | ||
component.properties.id.value = '"' + id + '"' | ||
const id = component.properties.id?.value || 'a_ui_form_' + Date.now() | ||
if (!component.properties.id?.value) { | ||
component.properties.id = { value: '"' + id + '"' } | ||
} | ||
if (component.eventHandlers.submit.value) { | ||
if (component.eventHandlers.submit?.value) { | ||
// add Renew icon while loading after validation check | ||
@@ -96,3 +96,3 @@ context.imports.add('import Button from "' + pathes.carbonComponents + '/Button/Button.svelte"') | ||
// add preventDefault to submit (this will be triggered after validating the form) | ||
if (component.eventHandlers.submit.value && component.eventHandlers.submit.type !== 'custom') { | ||
if (component.eventHandlers.submit?.value && component.eventHandlers.submit.type !== 'custom') { | ||
component.eventHandlers.submit.before = 'event.preventDefault(); ' + id + '_submitting = true;' | ||
@@ -99,0 +99,0 @@ component.eventHandlers.submit.after = 'setTimeout(() => ' + id + '_submitting = false, 500);' |
{ | ||
"name": "avtryck-ui-for-p-red", | ||
"version": "1.0.30", | ||
"version": "1.0.31", | ||
"description": "A plugin to add carbon design components to p-red.", | ||
@@ -5,0 +5,0 @@ "author": "Christian Geiger", |
93857