Progress on forms overhaul: insert lib node broken
This commit is contained in:
@@ -172,6 +172,7 @@
|
||||
@change="change('reset', ...arguments)"
|
||||
/>
|
||||
</form-section>
|
||||
<slot />
|
||||
</form-sections>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -65,13 +65,15 @@
|
||||
:error-messages="errors.silent"
|
||||
@change="change('silent', ...arguments)"
|
||||
/>
|
||||
<form-section
|
||||
v-if="$slots.children"
|
||||
name="Children"
|
||||
standalone
|
||||
>
|
||||
<slot name="children" />
|
||||
</form-section>
|
||||
<form-sections>
|
||||
<form-section
|
||||
v-if="$slots.children"
|
||||
name="Children"
|
||||
>
|
||||
<slot name="children" />
|
||||
</form-section>
|
||||
<slot />
|
||||
</form-sections>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
/>
|
||||
</div>
|
||||
</form-section>
|
||||
<slot />
|
||||
</form-sections>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -44,12 +44,14 @@
|
||||
:error-messages="errors.silent"
|
||||
@change="change('silent', ...arguments)"
|
||||
/>
|
||||
<form-section
|
||||
name="Children"
|
||||
standalone
|
||||
>
|
||||
<slot name="children" />
|
||||
</form-section>
|
||||
<form-sections>
|
||||
<form-section
|
||||
name="Children"
|
||||
>
|
||||
<slot name="children" />
|
||||
</form-section>
|
||||
<slot />
|
||||
</form-sections>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
@change="change('tags', ...arguments)"
|
||||
/>
|
||||
</form-section>
|
||||
<slot />
|
||||
</form-sections>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,31 +1,8 @@
|
||||
<template lang="html">
|
||||
<div class="folder-form">
|
||||
<div class="layout wrap">
|
||||
<text-field
|
||||
ref="focusFirst"
|
||||
label="Name"
|
||||
style="flex-basis: 300px;"
|
||||
:value="model.name"
|
||||
:error-messages="errors.name"
|
||||
@change="change('name', ...arguments)"
|
||||
/>
|
||||
<form-sections>
|
||||
<form-section
|
||||
v-if="$slots.children"
|
||||
name="Children"
|
||||
>
|
||||
<slot name="children" />
|
||||
</form-section>
|
||||
|
||||
<form-section name="Advanced">
|
||||
<smart-combobox
|
||||
label="Tags"
|
||||
multiple
|
||||
chips
|
||||
deletable-chips
|
||||
:value="model.tags"
|
||||
@change="change('tags', ...arguments)"
|
||||
/>
|
||||
<smart-switch
|
||||
label="Group children on a card"
|
||||
:value="model.groupStats"
|
||||
@@ -69,6 +46,7 @@
|
||||
</div>
|
||||
</v-expand-transition>
|
||||
</form-section>
|
||||
<slot />
|
||||
</form-sections>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,22 +19,12 @@ export default {
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
mounted(){
|
||||
// Don't autofocus on mobile, it brings up the on-screen keyboard
|
||||
if (this.$vuetify.breakpoint.smAndDown) return;
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.$refs.focusFirst && this.$refs.focusFirst.focus){
|
||||
this.$refs.focusFirst.focus()
|
||||
}
|
||||
}, 300);
|
||||
},
|
||||
methods: {
|
||||
change(path, value, ack){
|
||||
if (!Array.isArray(path)){
|
||||
change(path, value, ack) {
|
||||
if (!Array.isArray(path)) {
|
||||
path = [path];
|
||||
}
|
||||
this.$emit('change', {path, value, ack});
|
||||
this.$emit('change', { path, value, ack });
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user