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: add hidden input with name attribute #2212

Merged
merged 7 commits into from
Nov 24, 2023
Merged

Conversation

felix-ico
Copy link
Collaborator

this should fix #2173

Copy link

netlify bot commented Nov 16, 2023

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit 9970c52
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/6560ad7f4d550e0008d2f3d9
😎 Deploy Preview https://deploy-preview-2212--marvelous-moxie-a6e2fe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@acstll acstll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you decide to use a prop with a different name, adding it to Storybook would be necessary imo.

@@ -208,6 +208,8 @@ export class DropdownSelect {
@Prop() ariaLabelSelected?: string = 'selected';
/** (optional) Text displayed in high contrast mode only to indicate disabled state */
@Prop() hcmLabelDisabled?: string = 'this field is disabled';
/** (optional) is the element used in a form */
@Prop() formAssociated?: boolean = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call this formAssociated because it's not exactly the same as the standard static method.

I would actually not use any prop at all and just render the hidden input, always. The button has similar "hacks"… What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, will do that instead

@felix-ico felix-ico merged commit ebd325f into main Nov 24, 2023
@felix-ico felix-ico deleted the fix/dropdown-select-forms branch November 24, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropdown Select: Support as form element inside HTML forms
2 participants