@operato/input 1.2.26 → 1.2.29
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/CHANGELOG.md +19 -0
- package/dist/src/locale/locale-picker.js.map +1 -1
- package/dist/src/ox-buttons-radio.js.map +1 -1
- package/dist/src/ox-checkbox.js.map +1 -1
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-angle.js.map +1 -1
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-code.js.map +1 -1
- package/dist/src/ox-input-color-gradient.js.map +1 -1
- package/dist/src/ox-input-color-stops.js.map +1 -1
- package/dist/src/ox-input-color.js.map +1 -1
- package/dist/src/ox-input-container.js.map +1 -1
- package/dist/src/ox-input-crontab.js.map +1 -1
- package/dist/src/ox-input-data.js.map +1 -1
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-hashtags.js.map +1 -1
- package/dist/src/ox-input-image.js.map +1 -1
- package/dist/src/ox-input-key-values.js.map +1 -1
- package/dist/src/ox-input-layout/ox-input-card-layout.js.map +1 -1
- package/dist/src/ox-input-layout/ox-input-grid-layout.js.map +1 -1
- package/dist/src/ox-input-mass-fraction.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.js +7 -6
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-quantifier.js.map +1 -1
- package/dist/src/ox-input-range.js.map +1 -1
- package/dist/src/ox-input-scene-component-id.js.map +1 -1
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/src/ox-input-stack.js.map +1 -1
- package/dist/src/ox-input-unit-number.js.map +1 -1
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -21
- package/src/ox-input-options.ts +8 -6
package/src/ox-input-options.ts
CHANGED
@@ -82,7 +82,7 @@ export class OxInputOptions extends OxFormField {
|
|
82
82
|
return html`
|
83
83
|
${(options || []).map(
|
84
84
|
item => html`
|
85
|
-
<div data-record
|
85
|
+
<div data-record>
|
86
86
|
<input type="text" data-text="" placeholder="text" .value=${item.text} />
|
87
87
|
<input type="text" data-value="" placeholder="value" .value=${item.value} />
|
88
88
|
<button class="record-action" @click=${(e: MouseEvent) => this._delete(e)} tabindex="-1">
|
@@ -91,8 +91,7 @@ export class OxInputOptions extends OxFormField {
|
|
91
91
|
</div>
|
92
92
|
`
|
93
93
|
)}
|
94
|
-
|
95
|
-
<div data-record-new="">
|
94
|
+
<div data-record-new>
|
96
95
|
<input type="text" data-text="" placeholder="text" value="" />
|
97
96
|
<input type="text" data-value="" placeholder="value" value="" @change=${(e: Event) => this._add()} />
|
98
97
|
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
@@ -114,7 +113,7 @@ export class OxInputOptions extends OxFormField {
|
|
114
113
|
|
115
114
|
var div = input.parentElement
|
116
115
|
|
117
|
-
if (div && div.hasAttribute('data-record')) {
|
116
|
+
if (div && div.hasAttribute('data-record') && input.hasAttribute('data-value')) {
|
118
117
|
var dataList = div.querySelectorAll('[data-value]:not([hidden])') as NodeListOf<HTMLInputElement>
|
119
118
|
|
120
119
|
for (var i = 0; i < dataList.length; i++) {
|
@@ -124,8 +123,11 @@ export class OxInputOptions extends OxFormField {
|
|
124
123
|
}
|
125
124
|
}
|
126
125
|
|
127
|
-
if (div && div.hasAttribute('data-record'))
|
128
|
-
|
126
|
+
if (div && div.hasAttribute('data-record')) {
|
127
|
+
this._build(true)
|
128
|
+
} else if (div && div.hasAttribute('data-record-new') && input.hasAttribute('data-value')) {
|
129
|
+
this._add()
|
130
|
+
}
|
129
131
|
|
130
132
|
e.stopPropagation()
|
131
133
|
|