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

Datepicker dropdown let's you choose the default value of "Choose month" and "Choose year" #2416

Closed
amir-ag opened this issue Feb 21, 2023 · 3 comments · Fixed by #2417
Closed
Labels
Accepted A feature request or issue is accepted and will be implemented Bug

Comments

@amir-ag
Copy link
Contributor

amir-ag commented Feb 21, 2023

Please only report technical bugs. Clarify design issues in the slack channel #ux-ui-support.

A user can select the default values of "Choose month" and "Choose year". When one of these values is selected, a type error stating "Cannot read properties of undefined (reading 'name')" is thrown.

Expected Behavior

The default values of "Choose month" and "Choose year" shouldn't be options to available to select.

Current Behavior

A user can select the default values of "Choose month" and "Choose year"

Steps to Reproduce

Codesandbox

  1. Click on one of the two dropdowns and select "Choose month" and "Choose year".
  2. A type error is thrown.

Possible Solution

Remove default values from selectable options.

@amir-ag amir-ag added the Bug label Feb 21, 2023
@markus-walther
Copy link
Contributor

This is most likely a consequence of this 1-character typo in axa-dropdown: _disable instead of _disabled, cf. https://github.com/axa-ch-webhub-cloud/pattern-library/blob/develop/src/components/20-molecules/dropdown/index.js#L98

@markus-walther markus-walther added the Accepted A feature request or issue is accepted and will be implemented label Mar 6, 2023
@markus-walther
Copy link
Contributor

Note that the bug appears if the mobile view is triggered, e.g. on smaller screen widths, forcing the native <select> of the embedded dropdowns to be used.

Thus, testing that the bug is fixed must be done primarily on smaller screen widths.

@markus-walther
Copy link
Contributor

This is tracked on https://jira.axa.com/jira/browse/WEBHUB-2210 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted A feature request or issue is accepted and will be implemented Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants