Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Dropdown): fix Dropdown ArrowLeft keydown behavior for multiple variants #1564

Merged
merged 7 commits into from
Jul 3, 2019

Conversation

silviuaavram
Copy link
Collaborator

fixes #1129

It was broken when the user was (shift-)tabbing from the last selected item. If the last item was already marked as active, then ArrowLeft from SearchInput would not re-focus it, due to the logic in DropdownSelectedItem:

if (!prevProps.active && this.props.active) {

I don't like the solution chosen but I cannot think of anything else less intrusive than this.

@silviuaavram silviuaavram added accessibility All the Accessibility tasks and bugs should be tagged with this. 🚀 ready for review labels Jul 1, 2019
@codecov
Copy link

codecov bot commented Jul 1, 2019

Codecov Report

Merging #1564 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1564      +/-   ##
==========================================
+ Coverage   71.65%   71.66%   +0.01%     
==========================================
  Files         848      848              
  Lines        6907     6910       +3     
  Branches     1982     1983       +1     
==========================================
+ Hits         4949     4952       +3     
  Misses       1952     1952              
  Partials        6        6
Impacted Files Coverage Δ
...ackages/react/src/components/Dropdown/Dropdown.tsx 88.6% <100%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 644f816...bb64b41. Read the comment docs.

@silviuaavram silviuaavram changed the title fix(Dropdown): fix ArrowLeft keydown from SearchInput issue fix(Dropdown): fix Dropdown ArrowLeft keydown behavior for multiple variants Jul 2, 2019
@jurokapsiar
Copy link
Contributor

please add changelog

@silviuaavram silviuaavram merged commit d237ca0 into master Jul 3, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/dropdown-selected-item-focus branch July 3, 2019 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility All the Accessibility tasks and bugs should be tagged with this. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility > Dropdown > Multiple Search/Selection - Not able to navigate to selected user, when tab/shifTab
2 participants