mirror of
https://github.com/directus/directus.git
synced 2026-01-28 18:18:10 -05:00
add select mode to user modal
This commit is contained in:
@@ -7,5 +7,26 @@ export default defineInterface(({ i18n }) => ({
|
||||
icon: 'person',
|
||||
component: InterfaceUser,
|
||||
types: ['uuid'],
|
||||
options: [],
|
||||
options: [
|
||||
{
|
||||
field: 'selectMode',
|
||||
name: i18n.t('select_mode'),
|
||||
type: 'string',
|
||||
meta: {
|
||||
width: 'full',
|
||||
interface: 'dropdown',
|
||||
options: {
|
||||
choices: [
|
||||
{ text: 'Auto', value: 'auto' },
|
||||
{ text: 'Dropdown', value: 'dropdown' },
|
||||
{ text: 'Modal', value: 'modal' },
|
||||
],
|
||||
},
|
||||
},
|
||||
schema: {
|
||||
default_value: 'auto',
|
||||
},
|
||||
},
|
||||
],
|
||||
recommendedDisplays: ['user'],
|
||||
}));
|
||||
|
||||
@@ -102,7 +102,7 @@ export default defineComponent({
|
||||
components: { ModalDetail, ModalBrowse },
|
||||
props: {
|
||||
value: {
|
||||
type: [Number, Object],
|
||||
type: [String, Object],
|
||||
default: null,
|
||||
},
|
||||
template: {
|
||||
@@ -162,7 +162,7 @@ export default defineComponent({
|
||||
(newValue) => {
|
||||
// When the newly configured value is a primitive, assume it's the primary key
|
||||
// of the item and fetch it from the API to render the preview
|
||||
if (newValue !== null && newValue !== currentUser.value?.id && typeof newValue === 'number') {
|
||||
if (newValue !== null && newValue !== currentUser.value?.id && typeof newValue === 'string') {
|
||||
fetchCurrent();
|
||||
}
|
||||
|
||||
|
||||
@@ -314,6 +314,7 @@
|
||||
"slug": "Slug",
|
||||
"repeater": "Repeater",
|
||||
"max-amount": "Max Amount",
|
||||
"select_mode": "Select Mode",
|
||||
|
||||
"months": {
|
||||
"january": "January",
|
||||
|
||||
Reference in New Issue
Block a user