fix configuration creation in picker

This commit is contained in:
2020-06-10 13:41:48 +02:00
parent d76a86aadc
commit 55bf577f7b
4 changed files with 35 additions and 12 deletions
@@ -149,9 +149,13 @@
watch: {
config()
{
this.buildConfig();
config: {
deep: true,
handler()
{
this.buildConfig();
this.loaded = false;
}
},
value(val)
{
@@ -212,18 +216,12 @@
},
mounted()
{
this.load();
},
methods: {
buildConfig()
{
var config = JSON.parse(JSON.stringify(defaultConfig));
this.configuration = _extend(defaultConfig, this.config);
this.configuration = _extend(JSON.parse(JSON.stringify(config)), this.config);
this.configuration.search = _extend(config.search, this.config.search || {});
this.configuration.addButton = _extend(config.addButton, this.config.addButton || {});
this.configuration.preview = _extend(config.preview, this.config.preview || {});
@@ -234,6 +232,10 @@
overlayOpened()
{
if (!this.loaded)
{
this.load();
}
if (this.configuration.search.focus)
{
this.$nextTick(() => this.$refs.search.focus());
@@ -141,7 +141,7 @@
height: 100%;
align-items: center;
position: relative;
color: var(--color-fg-mid);
color: var(--color-fg);
&:hover
{
@@ -302,7 +302,7 @@ button::-moz-focus-inner
display: inline-flex;
justify-content: center;
align-items: center;
padding: 5px;
padding: 10px;
}
}