@farm-investimentos/front-mfe-components 3.4.8 → 3.4.9
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/dist/front-mfe-components.common.js +63 -59
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +63 -59
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SelectModalOptions/SelectModalOptions.stories.js +23 -1
- package/src/components/SelectModalOptions/SelectModalOptions.vue +4 -1
- package/src/components/SelectModalOptions/__tests__/SelectModalOptions.spec.js +1 -0
package/package.json
CHANGED
|
@@ -26,4 +26,26 @@ export const Primary = () => ({
|
|
|
26
26
|
</div>`,
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
export const InitialValue = () => ({
|
|
30
|
+
components: { SelectModalOptions },
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
items: [
|
|
34
|
+
{ id: 1, name: 'name 1' },
|
|
35
|
+
{ id: 2, name: 'name 2' },
|
|
36
|
+
],
|
|
37
|
+
selectedValue: 23123,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
template: `<div>
|
|
41
|
+
<SelectModalOptions
|
|
42
|
+
:items="items"
|
|
43
|
+
v-model="selectedValue"
|
|
44
|
+
label="label"
|
|
45
|
+
inputId="some-id" />
|
|
46
|
+
<br />selected value: {{ selectedValue }}
|
|
47
|
+
</div>`,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
Primary.storyName = 'Basic';
|
|
51
|
+
InitialValue.storyName = 'Initial value';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:id="inputId"
|
|
14
14
|
:value="selectedValueText"
|
|
15
15
|
@click="openModal"
|
|
16
|
-
|
|
16
|
+
/>
|
|
17
17
|
|
|
18
18
|
<v-dialog content-class="modal-default modal-default-small" v-model="showModal">
|
|
19
19
|
<DialogHeader class="dialog-header" :title="modalTitle" @onClose="closeModal" />
|
|
@@ -229,6 +229,9 @@ export default Vue.extend({
|
|
|
229
229
|
this.pagination.pages = Math.ceil(newValue.length / 10);
|
|
230
230
|
},
|
|
231
231
|
},
|
|
232
|
+
mounted() {
|
|
233
|
+
this.selectedItem = { [this.itemLabelFormatter]: this.value };
|
|
234
|
+
},
|
|
232
235
|
methods: {
|
|
233
236
|
handlePagination(tablePagination) {
|
|
234
237
|
if (
|