fix: allow dynamic link in filters
This commit is contained in:
parent
7f4056cd20
commit
b4d9461c65
@ -41,6 +41,7 @@ def get_filterable_fields(doctype: str):
|
|||||||
"Float",
|
"Float",
|
||||||
"Int",
|
"Int",
|
||||||
"Currency",
|
"Currency",
|
||||||
|
"Dynamic Link",
|
||||||
"Link",
|
"Link",
|
||||||
"Long Text",
|
"Long Text",
|
||||||
"Select",
|
"Select",
|
||||||
|
|||||||
@ -103,7 +103,7 @@ import { FormControl, Autocomplete, createResource } from 'frappe-ui'
|
|||||||
import { h, defineModel, computed } from 'vue'
|
import { h, defineModel, computed } from 'vue'
|
||||||
|
|
||||||
const typeCheck = ['Check']
|
const typeCheck = ['Check']
|
||||||
const typeLink = ['Link']
|
const typeLink = ['Link', 'Dynamic Link']
|
||||||
const typeNumber = ['Float', 'Int', 'Currency', 'Percent']
|
const typeNumber = ['Float', 'Int', 'Currency', 'Percent']
|
||||||
const typeSelect = ['Select']
|
const typeSelect = ['Select']
|
||||||
const typeString = ['Data', 'Long Text', 'Small Text', 'Text Editor', 'Text']
|
const typeString = ['Data', 'Long Text', 'Small Text', 'Text Editor', 'Text']
|
||||||
@ -324,6 +324,9 @@ function getValSelect(f) {
|
|||||||
})),
|
})),
|
||||||
})
|
})
|
||||||
} else if (typeLink.includes(fieldtype)) {
|
} else if (typeLink.includes(fieldtype)) {
|
||||||
|
if (field.fieldtype === 'Dynamic Link') {
|
||||||
|
return h(FormControl, { type: 'text' })
|
||||||
|
}
|
||||||
return h(Link, { class: 'form-control', doctype: options })
|
return h(Link, { class: 'form-control', doctype: options })
|
||||||
} else if (typeNumber.includes(fieldtype)) {
|
} else if (typeNumber.includes(fieldtype)) {
|
||||||
return h(FormControl, { type: 'number' })
|
return h(FormControl, { type: 'number' })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user