fix(select-menu): keyboard not working when multiple

This commit is contained in:
07akioni 2020-11-17 18:28:41 +08:00
parent afd648069b
commit 9ef3cf0b0d

View File

@ -161,11 +161,14 @@ export default {
setup (props) {
const virtualListRef = ref(null)
const scrollbarRef = ref(null)
const { treeMate } = props
const pendingNodeRef = ref(
props.autoPending
? props.value === null
? props.treeMate.getFirstAvailableNode()
: props.treeMate.getNode(props.value)
? treeMate.getFirstAvailableNode()
: props.multiple
? treeMate.getNode((props.value || [])[0]) || treeMate.getFirstAvailableNode()
: treeMate.getNode(props.value) || treeMate.getFirstAvailableNode()
: null
)
onMounted(() => {