-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
feat(searchbar): autocapitalize, dir, lang, maxlength, and minlength are inherited to native input #29098
Conversation
@@ -3,13 +3,37 @@ import { newSpecPage } from '@stencil/core/testing'; | |||
import { Searchbar } from '../searchbar'; | |||
|
|||
describe('searchbar: rendering', () => { | |||
it('should inherit attributes', async () => { | |||
it('should inherit properties on load', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not test updating the properties because that would be testing Stencil behavior. I am, however, testing updating attributes to verify that I configured the attribute watchers correctly.
This comment was marked as outdated.
This comment was marked as outdated.
* In the future, this property will default to "off" to align with | ||
* Input and Textarea, and the "!" will not be needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make a tech debt ticket for this, but my plan was to make the change once this is merged since Ionic 8 is in beta now (and we can still make breaking changes).
Follow up PR: #29107 Blocked until |
Issue number: resolves #27606
What is the current behavior?
Certain attributes are not be inherited to the inner searchbar. Developers need control over these attributes to provide important context to users for things like language and text direction. Additionally, being able to control things like autocapitalize, maxlength, and minlength can help improve the user experience by a) guiding what should be entered into an input and b) removing autocapitalize where it's not appropriate.
What is the new behavior?
input
element. We also watch them so any changes to the attributes are also inherited to the nativeinput
.Does this introduce a breaking change?
Other information
Note: We expanded the scope of this work to also include input and textarea, and this work will be handled separately. However, the original request was only for searchbar so that's why I associated this PR with the linked issue.
Dev build:
7.7.3-dev.11709159644.114cd8b1