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

fix: remove name property for select field labels #277

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

ismay
Copy link
Member

@ismay ismay commented Sep 16, 2020

Closes #266

Our SingleSelectFields and MultiSelectFields were emitting a warning in the console when hovering over their label. This is because of a faulty name that was being passed to the Field component. It's not present in the props, so the global window.name was passed (""). That's also why it didn't show up in linting (since window.name exists).

Our select is not a labelable component (https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Form_labelable), so I've removed the name line from the SingleSelectField and MultiSelectField.

Our SingleSelectField and MultiSelectField were emitting a warning in the console when hovering over their label. This is because they were passing window.name to the Field name property.
@ismay ismay requested a review from a team as a code owner September 16, 2020 14:13
@cypress
Copy link

cypress bot commented Sep 16, 2020



Test summary

494 0 0 0


Run details

Project ui
Status Passed
Commit b993e27
Started Sep 16, 2020 2:12 PM
Ended Sep 16, 2020 2:24 PM
Duration 11:21 💡
OS Linux Ubuntu Linux - 18.04
Browser Electron 80

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ismay ismay merged commit 5767406 into master Sep 16, 2020
@ismay ismay deleted the fix-select-console-warning branch September 16, 2020 14:26
@dhis2-bot
Copy link
Contributor

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

Successfully merging this pull request may close these issues.

Hovering over a SingleSelectField's label gives a console warning
3 participants