Skip to content

Commit

Permalink
fix: dropdownVisibleChange invalid (#7033)
Browse files Browse the repository at this point in the history
Co-authored-by: undefined <undefined>
  • Loading branch information
selicens authored Oct 17, 2023
1 parent bf917f3 commit b4c29d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/vc-select/BaseSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,9 @@ export default defineComponent({
const onToggleOpen = (newOpen?: boolean) => {
const nextOpen = newOpen !== undefined ? newOpen : !mergedOpen.value;

if (!props.disabled) {
if (mergedOpen.value !== nextOpen && !props.disabled) {
setInnerOpen(nextOpen);
if (mergedOpen.value !== nextOpen) {
props.onDropdownVisibleChange && props.onDropdownVisibleChange(nextOpen);
}
props.onDropdownVisibleChange && props.onDropdownVisibleChange(nextOpen);
}
};

Expand Down

0 comments on commit b4c29d9

Please sign in to comment.