saasufy-components 2.4.2 → 2.5.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/model-input.js +6 -1
- package/model-text.js +5 -1
- package/package.json +1 -1
package/model-input.js
CHANGED
|
@@ -23,6 +23,7 @@ class ModelInput extends SocketConsumer {
|
|
|
23
23
|
'input-id',
|
|
24
24
|
'list',
|
|
25
25
|
'model-instance-property',
|
|
26
|
+
'bind-to-model',
|
|
26
27
|
'bind-to-collection',
|
|
27
28
|
'type',
|
|
28
29
|
'placeholder',
|
|
@@ -65,8 +66,9 @@ class ModelInput extends SocketConsumer {
|
|
|
65
66
|
|
|
66
67
|
render() {
|
|
67
68
|
this.innerHTML = '';
|
|
68
|
-
let
|
|
69
|
+
let bindToModel = this.hasAttribute('bind-to-model');
|
|
69
70
|
let bindToCollection = this.hasAttribute('bind-to-collection');
|
|
71
|
+
let modelInstanceProperty = this.getAttribute('model-instance-property');
|
|
70
72
|
let showErrorMessage = this.hasAttribute('show-error-message');
|
|
71
73
|
let inputId = this.getAttribute('input-id');
|
|
72
74
|
let inputList = this.getAttribute('list');
|
|
@@ -100,6 +102,9 @@ class ModelInput extends SocketConsumer {
|
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
if (!model) {
|
|
105
|
+
if (bindToModel) {
|
|
106
|
+
modelInstanceProperty = 'model';
|
|
107
|
+
}
|
|
103
108
|
currentNode = this.parentNode;
|
|
104
109
|
if (modelInstanceProperty) {
|
|
105
110
|
while (currentNode) {
|
package/model-text.js
CHANGED
|
@@ -37,8 +37,9 @@ class ModelText extends SocketConsumer {
|
|
|
37
37
|
|
|
38
38
|
render() {
|
|
39
39
|
this.innerHTML = '';
|
|
40
|
-
let
|
|
40
|
+
let bindToModel = this.hasAttribute('bind-to-model');
|
|
41
41
|
let bindToCollection = this.hasAttribute('bind-to-collection');
|
|
42
|
+
let modelInstanceProperty = this.getAttribute('model-instance-property');
|
|
42
43
|
let modelType = this.getAttribute('model-type');
|
|
43
44
|
let modelId = this.getAttribute('model-id');
|
|
44
45
|
let modelField = this.getAttribute('model-field');
|
|
@@ -64,6 +65,9 @@ class ModelText extends SocketConsumer {
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
if (!model) {
|
|
68
|
+
if (bindToModel) {
|
|
69
|
+
modelInstanceProperty = 'model';
|
|
70
|
+
}
|
|
67
71
|
currentNode = this.parentNode;
|
|
68
72
|
if (modelInstanceProperty) {
|
|
69
73
|
while (currentNode) {
|