Skip to content

Commit

Permalink
Custom Select: Add temporary console debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Oct 16, 2019
1 parent 909280c commit 421f9fb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/components/src/custom-select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ const stateReducer = (
{ selectedItem },
{ type, changes, props: { items } }
) => {
// TODO: Remove this.
// eslint-disable-next-line no-console
console.debug(
'Selected Item: ',
selectedItem,
'Type: ',
type,
'Changes: ',
changes,
'Items: ',
items
);
switch ( type ) {
case useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:
// If we already have a selected item, try to select the next one,
Expand Down Expand Up @@ -84,6 +96,7 @@ export default function CustomSelect( { label, items } ) {
</span>
<Button
{ ...getToggleButtonProps( {
// This is needed because some speech recognition software don't support `aria-labelledby`.
'aria-label': label,
className: 'components-custom-select__button',
} ) }
Expand Down

0 comments on commit 421f9fb

Please sign in to comment.