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

chore(text-field): add autocomplete attribute #4838

Merged

Conversation

vdegenne
Copy link
Contributor

@vdegenne vdegenne commented Sep 4, 2023

Fixes #4837
Fixes #82

Copy link
Collaborator

@asyncLiz asyncLiz left a comment

Choose a reason for hiding this comment

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

We shouldn't strictly type this since there are so many including non-platform standard ones like 1password. I believe we can fix any lit-analyzer errors with as unknown as string

#4837 (comment)

Copy link
Collaborator

@asyncLiz asyncLiz left a comment

Choose a reason for hiding this comment

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

🤌

@asyncLiz
Copy link
Collaborator

asyncLiz commented Sep 6, 2023

Yea it's mad at us too. Try swapping it to this:

// Lit analyzer has too strict of types for input autocomplete
// tslint:disable-next-line:no-any
const autocomplete = this.autocomplete as any;

<input autocomplete=${autocomplete || nothing}

We also need to add the attribute to the <textarea>

@vdegenne vdegenne requested a review from asyncLiz September 9, 2023 12:41
@copybara-service copybara-service bot merged commit c478b3f into material-components:main Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

md-text-field ignoring autocomplete attribute Broken textfield autocomplete
2 participants