fix: switching checkbox to multiselect - mysql

re #6747
This commit is contained in:
Pranav C
2023-11-23 13:00:39 +05:30
parent 0e3fe37362
commit efb539a4e6
3 changed files with 11 additions and 8 deletions

View File

@@ -132,9 +132,13 @@ const vModel = computed({
const selectedTitles = computed(() =>
modelValue
? typeof modelValue === 'string'
? isMysql(column.value.source_id)
? modelValue.split(',').sort((a, b) => {
? Array.isArray(modelValue)
? modelValue
: isMysql(column.value.source_id)
? modelValue
.toString()
.split(',')
.sort((a, b) => {
const opa = options.value.find((el) => el.title === a)
const opb = options.value.find((el) => el.title === b)
if (opa && opb) {
@@ -142,8 +146,7 @@ const selectedTitles = computed(() =>
}
return 0
})
: modelValue.split(',')
: modelValue
: modelValue.toString().split(',')
: [],
)