add headerPlaceholder prop to repeater

This commit is contained in:
Nitwel
2020-10-09 18:42:42 +02:00
parent b13ec9ed33
commit 7753b79f02
4 changed files with 16 additions and 2 deletions

View File

@@ -123,7 +123,9 @@ fields:
options:
iconRight: title
placeholder: Label this group...
- name: Accordion
schema:
is_nullable: false
- name: Type
field: accordion
type: string
schema:
@@ -154,6 +156,8 @@ fields:
meta:
interface: collection
width: full
schema:
is_nullable: false
special: json
sort: 10
width: full

View File

@@ -25,7 +25,7 @@ export default defineComponent({
},
placeholder: {
type: String,
default: i18n.t('empty_item'),
default: null,
},
toggle: {
type: Function,

View File

@@ -7,6 +7,7 @@
:toggle="toggle"
@delete="$emit('delete')"
:disabled="disabled"
:placeholder="headerPlaceholder"
/>
<transition-expand>
<div v-if="active">
@@ -46,6 +47,10 @@ export default defineComponent({
type: Boolean,
default: false,
},
headerPlaceholder: {
type: String,
default: null
}
},
});
</script>

View File

@@ -10,6 +10,7 @@
@input="updateValues(index, $event)"
@delete="removeItem(row)"
:disabled="disabled"
:headerPlaceholder="headerPlaceholder"
/>
</draggable>
<button @click="addNew" class="add-new" v-if="showAddNew">
@@ -54,6 +55,10 @@ export default defineComponent({
type: Boolean,
default: false,
},
headerPlaceholder: {
type: String,
default: i18n.t('empty_item'),
}
},
setup(props, { emit }) {
const selection = ref<number[]>([]);