We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey Daniel,
There is a small issue when using the md-text-area with md-placeholder. The code fails at the following location:
md-text-area
md-placeholder
this.input.setAttribute('placeholder', this.mdPlaceholder);
this.input is undefined. The reason for this is the binding in the md-input template: if.bind="mdTextArea === true" since it requires a boolean value.
this.input
md-input
if.bind="mdTextArea === true"
Initially, if we use the following: <md-input md-label="Description" md-placeholder="Enter a description" md-text-area="true"></md-input>
<md-input md-label="Description" md-placeholder="Enter a description" md-text-area="true"></md-input>
The md-text-area="true" is evaluated to a true string and not a boolean.
md-text-area="true"
true
If I use the following: <md-input md-label="Description" md-placeholder="Enter a description" md-text-area.one-time="true"></md-input>
<md-input md-label="Description" md-placeholder="Enter a description" md-text-area.one-time="true"></md-input>
It works because the one-time binding is evaluating the true to a boolean value.
one-time
You might try moving the following line from the attached to the bind method of the md-input custom element:
attached
bind
this.mdTextArea = getBooleanFromAttributeValue(this.mdTextArea);
The text was updated successfully, but these errors were encountered:
Great bug report, thanks! 😄 It's interesting though, that it seems to work in the sample.
If you like, you can also issue a PR and I will merge it. If you do, please follow our commit message conventions.
Sorry, something went wrong.
d63aff6
Done and updated samples to show text area placeholders. Thanks again for the suggestion and solution. 😄
Thanks for the fix!
No branches or pull requests
Hey Daniel,
There is a small issue when using the
md-text-area
withmd-placeholder
. The code fails at the following location:this.input.setAttribute('placeholder', this.mdPlaceholder);
this.input
is undefined. The reason for this is the binding in themd-input
template:if.bind="mdTextArea === true"
since it requires a boolean value.Initially, if we use the following:
<md-input md-label="Description" md-placeholder="Enter a description" md-text-area="true"></md-input>
The
md-text-area="true"
is evaluated to atrue
string and not a boolean.If I use the following:
<md-input md-label="Description" md-placeholder="Enter a description" md-text-area.one-time="true"></md-input>
It works because the
one-time
binding is evaluating thetrue
to a boolean value.You might try moving the following line from the
attached
to thebind
method of themd-input
custom element:this.mdTextArea = getBooleanFromAttributeValue(this.mdTextArea);
The text was updated successfully, but these errors were encountered: