Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telphone's dropdown does not open when changing arrow-icon slot #413

Closed
cuongle-hdwebsoft opened this issue Aug 22, 2023 · 0 comments
Closed

Comments

@cuongle-hdwebsoft
Copy link
Contributor

cuongle-hdwebsoft commented Aug 22, 2023

Hi,
Seem like changing the arrow icon can lead to this issue. Here is my example code:

<vue-tel-input v-model="phoneModel" v-bind="options" @onInput="onInput">
          <template v-slot:arrow-icon="{ open }">
              <div v-if="open">open</div>
               <div v-else>close</div>
          </template>
</vue-tel-input>

Then when you click the new arrow icon, it will not open the country dropdown.

  • I found the related issue and the solution to fix it. Because the element is removed before it finishes running clickOutsideEvent. So, el.contains(event.target) always returns false
if (!(el === event.target || el.contains(event.target))) {

}

Solution: JedWatson/react-select#4560 (comment)

I am really happy to contribute MR #414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant