Made selecting a property from a library use the mobile friendly library

This commit is contained in:
Thaum Rystra
2020-05-25 17:39:25 +02:00
parent b61dd6e81a
commit f7cbee27f9
3 changed files with 29 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
<library-and-node
slot="unwrapped-content"
style="height: 100%;"
selection
@selected="val => node = val"
/>
<template slot="actions">

View File

@@ -60,6 +60,9 @@ export default {
LibraryBrowser,
LibraryNodeDialog,
},
props: {
selection: Boolean,
},
data(){ return {
organize: false,
selected: undefined,
@@ -86,6 +89,13 @@ export default {
elementId: `tree-node-${id}`,
data: {
_id: id,
selection: this.selection,
},
callback: result => {
console.log(result)
if (result){
this.selected = id;
}
},
});
}

View File

@@ -36,7 +36,23 @@
slot="actions"
class="layout row justify-end"
>
<template v-if="selection">
<v-btn
flat
@click="$store.dispatch('popDialogStack', false)"
>
Cancel
</v-btn>
<v-spacer />
<v-btn
flat
@click="$store.dispatch('popDialogStack', true)"
>
Select
</v-btn>
</template>
<v-btn
v-else
flat
@click="$store.dispatch('popDialogStack')"
>
@@ -84,7 +100,8 @@
props: {
_id: String,
startInEditTab: Boolean,
embedded: Boolean, //This dialog is embedded in a page
embedded: Boolean, // This dialog is embedded in a page
selection: Boolean, // This dialog is being used to select a node
},
reactiveProvide: {
name: 'context',