tangy-form
Advanced tools
Comparing version 4.43.2 to 4.45.0
# CHANGELOG | ||
## v4.43.0, v4.43.1, v4.43.2 | ||
## v4.45.0 | ||
At times we may need to disable some components when form is unlocked A good example is the tangy-gps component | ||
Add disabled property and readOnly property | ||
For example: `this.unlockFormResponses? this.formEl.unlock({disableComponents:['TANGY-GPS']}): null` | ||
Refs [Tangerine-Community/Tangerine#3703](https://github.com/Tangerine-Community/Tangerine/issues/3703) | ||
Part of [Tangerine-Community/Tangerine#3719](https://github.com/Tangerine-Community/Tangerine/pull/3719) | ||
## v4.44.0, v4.43.0, v4.43.1, v4.43.2 | ||
__Tangerine Radio Blocks__ | ||
@@ -6,0 +18,0 @@ |
{ | ||
"name": "tangy-form", | ||
"description": "A form element for lazy loaded multipage forms", | ||
"version": "4.43.2", | ||
"version": "4.45.0", | ||
"main": "tangy-form.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -169,3 +169,7 @@ // Probably never used, tangy-form will set the form with a TangyFormResponseModel. | ||
const inputMeta = itemMeta.inputs.find(inputMeta => inputMeta.name === input.name) | ||
return Object.assign({}, input, {disabled: inputMeta ? inputMeta.disabled : false}) | ||
if(action.meta.disableComponents && action.meta.disableComponents.length > 0){ | ||
inputMeta.disabled = action.meta.disableComponents.find(e => e.toLowerCase() === input.tagName.toLowerCase()) | ||
inputMeta.readOnly = true | ||
} | ||
return Object.assign({}, input, {disabled: inputMeta ? !!inputMeta.disabled : false, readOnly: inputMeta.readOnly}) | ||
}) | ||
@@ -172,0 +176,0 @@ return Object.assign({}, item, itemMeta, props) |
@@ -813,4 +813,4 @@ import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; | ||
unlock() { | ||
const meta = this.getMeta() | ||
unlock(options ={}) { | ||
const meta = {...this.getMeta(), ...options} | ||
this.store.dispatch({ | ||
@@ -817,0 +817,0 @@ type: 'UNLOCK', |
Sorry, the diff of this file is too big to display
5303653
24544