|
|
@ -21,16 +21,17 @@ const localValue = computed({ |
|
|
|
const options = computed<SelectProps['options']>(() => |
|
|
|
const options = computed<SelectProps['options']>(() => |
|
|
|
meta.value?.columns |
|
|
|
meta.value?.columns |
|
|
|
?.filter((c: ColumnType) => { |
|
|
|
?.filter((c: ColumnType) => { |
|
|
|
/** ignore hasmany and manytomany relations if it's using within sort menu */ |
|
|
|
if (c.uidt === UITypes.QrCode) { |
|
|
|
if (isSort) { |
|
|
|
return false |
|
|
|
|
|
|
|
} else if (isSort) { |
|
|
|
|
|
|
|
/** ignore hasmany and manytomany relations if it's using within sort menu */ |
|
|
|
return !( |
|
|
|
return !( |
|
|
|
c.uidt === UITypes.LinkToAnotherRecord && (c.colOptions as LinkToAnotherRecordType).type !== RelationTypes.BELONGS_TO |
|
|
|
c.uidt === UITypes.LinkToAnotherRecord && (c.colOptions as LinkToAnotherRecordType).type !== RelationTypes.BELONGS_TO |
|
|
|
) |
|
|
|
) |
|
|
|
/** ignore virtual fields which are system fields ( mm relation ) and qr code fields */ |
|
|
|
/** ignore virtual fields which are system fields ( mm relation ) and qr code fields */ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const isQrCode = c.uidt === UITypes.QrCode |
|
|
|
|
|
|
|
const isVirtualSystemField = c.colOptions && c.system |
|
|
|
const isVirtualSystemField = c.colOptions && c.system |
|
|
|
return !isVirtualSystemField && !isQrCode |
|
|
|
return !isVirtualSystemField |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.map((c: ColumnType) => ({ |
|
|
|
.map((c: ColumnType) => ({ |
|
|
@ -50,14 +51,9 @@ const filterOption = (input: string, option: any) => option.label.toLowerCase()? |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-select |
|
|
|
<a-select v-model:value="localValue" :dropdown-match-select-width="false" show-search |
|
|
|
v-model:value="localValue" |
|
|
|
:placeholder="$t('placeholder.selectField')" :filter-option="filterOption" |
|
|
|
:dropdown-match-select-width="false" |
|
|
|
dropdown-class-name="nc-dropdown-toolbar-field-list"> |
|
|
|
show-search |
|
|
|
|
|
|
|
:placeholder="$t('placeholder.selectField')" |
|
|
|
|
|
|
|
:filter-option="filterOption" |
|
|
|
|
|
|
|
dropdown-class-name="nc-dropdown-toolbar-field-list" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-select-option v-for="option in options" :key="option.value" :label="option.label" :value="option.value"> |
|
|
|
<a-select-option v-for="option in options" :key="option.value" :label="option.label" :value="option.value"> |
|
|
|
<div class="flex gap-2 items-center items-center h-full"> |
|
|
|
<div class="flex gap-2 items-center items-center h-full"> |
|
|
|
<component :is="option.icon" class="min-w-5 !mx-0" /> |
|
|
|
<component :is="option.icon" class="min-w-5 !mx-0" /> |
|
|
|