saasufy-components 6.0.5 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/input-provider.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -693,6 +693,7 @@ This component can be configured to provide its data to multiple components (con
|
|
|
693
693
|
- `autocorrect`: Can be `on` or `off` - It will set the auto-correct attribute on the inner input element. This is useful for mobile devices to enable or disable auto-correct.
|
|
694
694
|
- `input-props`: Can be used to set additional attributes on the inner `input` element. Must be in the format `attr1=value1,attr2=value2`.
|
|
695
695
|
- `skip-init-change`: This attribute can be used to prevent an `input-provider` of type `select` from triggering a change when initialized with a default option. By default, the `input-provider` will trigger a change when initialized with a default value.
|
|
696
|
+
- `force-init-change`: This attribute can be used to force an `input-provider` to always trigger a change when initialized, even if the value is empty.
|
|
696
697
|
|
|
697
698
|
### input-combiner
|
|
698
699
|
|
package/input-provider.js
CHANGED
|
@@ -193,7 +193,10 @@ class InputProvider extends HTMLElement {
|
|
|
193
193
|
|
|
194
194
|
let destroyHandlers = this.updateConsumerElementsOnEdit();
|
|
195
195
|
|
|
196
|
-
if (
|
|
196
|
+
if (this.hasAttribute('force-init-change')) {
|
|
197
|
+
this.forceTriggerChange = true;
|
|
198
|
+
this.value = value;
|
|
199
|
+
} else if (value) {
|
|
197
200
|
if (type === 'select' && !this.hasAttribute('skip-init-change')) {
|
|
198
201
|
this.forceTriggerChange = true;
|
|
199
202
|
}
|