I’m trying to add a custom select field to a User Blueprint. It’s showing up on the page, and it’s registered as a plugin.
When I change the value of the custom field, the Panel and/or Vue don’t seem to communicate the change of state, meaning there’s no option to Save the change. Other fields in the User Blueprint do trigger the Save and Revert buttons.
Any thoughts on what I’m missing…? Thanks in advance!
index.js
panel.plugin('sodaville/publicationFormatOptions', {
fields: {
publicationformat: {
extends: 'k-select-field',
props: {
options: {
type: Array,
required: true
}
},
computed: {
formattedOptions() {
return this.options.map(option => {
return {
value: option.value,
text: option.text
};
});
}
},
methods: {
updateValue(value) {
console.log('Value updated:', value);
this.$emit('input', value);
}
},
template: `
<k-select-field v-bind="$props" :options="formattedOptions"></k-select-field>
`
}
}
});
User.yml
title:
en: Contributor
description:
en: Somebody who has helped make a comic, either as a creative or as part of editorial. A Contributor can't log into the site; but they need to be added so they can receive credit for their work.
access:
languages: false
system: false
users: false
files:
create: true
changeName: true
changeTemplate: false
delete: false
read: true
replace: true
update: true
languages: false
pages:
access: true
changeSlug: false
changeStatus: false
changeTemplate: false
changeTitle: false
create: true
delete: false
list: true
move: false
duplicate: false
preview: true
read: true
sort: true
update: true
site:
changeTitle: false
update: false
user:
changeEmail: true
changeLanguage: true
changeName: true
changePassword: true
changeRole: true
delete: true
update: true
users: false
columns:
- width: 1/2
fields:
bio:
label: Bio
type: textarea
website:
label: Website
type: url
- width: 1/2
fields:
publicationFormat:
label: Your default publication format
type: publicationformat