-
Notifications
You must be signed in to change notification settings - Fork 5
fix: no onSelect event when same item selected #102
Conversation
🎊 PR Preview c79b742 has been successfully built and deployed to https://iambumblehead-react-dropdown-now-preview-pr-102.surge.sh 🕐 Build time: 173.451s 🤖 By surge-preview |
@lwhiteley changes here are for this ticket #96 |
@lwhiteley the more I think about it... the current behaviour before the changes here seems correct. Maybe we should close the issue and update the test to verify that onSelect is called even when the value is the same. What do you think? |
Think the issue is that the events should not be triggered when there is no user interaction |
@lwhiteley I had the same impression at first and I even added a test that rendered two dropdowns referencing the same value --changing one dropdown did not change the value or trigger events at the other dropdown. I could re-add that test. |
@lwhiteley upon second thought, the two-dropdowns tests used a primitive value "one" and maybe using an object value instead triggers the onChange event. |
I'll add the two-dropdowns test in a few hours |
@lwhiteley please review |
@lwhiteley I was able to reproduce the issue. Changing the value of the second dropdown triggered onChange at the first dropdown. To resolve it, the dropdown reads the event target to detect if the event originates at the dropdown. |
There could issues if the dropdown later needed to support keyboard selection and input, but if you're OK with the current change I will be too. |
do you use Matrix @lwhiteley? https://matrix.org/clients/ |
never heard of it. what would be the purpose of it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can go with this for now and maybe review the entire composition in a next major version
actually seems i have used it without knowing. i used gitter.im before. You can create rooms for git repositories |
@lwhiteley this page has a little blurb describing matrix https://tatsumoto-ren.github.io/blog/join-our-community.html
I know about it because there are clients for ubuntu touch and gnome3, which I use on my phone and desktop. Also, I like messaging applications and have been building a service that follows the matrix spec in many parts. I would like to be your friend on Matrix or another messaging system. |
can chat privately on https://gitter.im/ and discuss further |
I signed in there with my github proifile and if I type "lwhi" or "whit" it doesn't auto-complete "lwhitely" there. |
No description provided.