-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Textfield type="password" not working for antd style #345
Comments
Yep, it's filtered with |
Looks like the the transpiled files were not updated. // uniforms-antd/Textfield.js | lines 33 - 45
var Text = function Text(props) {
return (0, _wrapField2.default)(props, _react2.default.createElement(_input2.default, (0, _extends3.default)({
disabled: props.disabled,
id: props.id,
name: props.name,
onChange: function onChange(event) {
return props.onChange(event.target.value);
},
placeholder: props.placeholder,
// missing 'type' prop here
ref: props.inputRef,
value: props.value
}, (0, _filterDOMProps2.default)(props))));
}; |
Yep, my fault. I've published fixed |
All good now! thanks |
I believe I'm having this same issue in uniforms-material, but I can't for the life of me figure out why. I don't think it's filtered by filterDOMProps based on my reading of the code, but the screenshots below show that it's somehow getting filtered out... I'm using the following code to generate the form: import React from 'react';
import Autoform from 'uniforms-material/Autoform';
import TextField from 'uniforms-material/TextField';
import SubmitField from 'uniforms-material/SubmitField';
import { LoginSchema } from '/lib/schemas.js';
const onSubmit = (doc) => {
Meteor.loginWithPassword(doc.email, doc.password, (err) => {
if (err !== undefined) {
console.log(err);
} else {
console.log('Login success! Redirect!');
}
});
};
const Login = (props) => (
<div className='login-modal'>
<Autoform schema={LoginSchema} placeholder={true} label={false} onSubmit={onSubmit}>
<TextField name='email'/>
<TextField name='password' type='password'/>
<SubmitField/>
<p>Don't have an account? <a href='/signup'>Register</a></p>
</Autoform>
</div>
);
export default Login; |
Thanks for the quick add for that! Much appreciated! |
Hi, This is may not be the same issue as described above but it's definitely similar. On https://uniforms.tools if you check the example forms and type something in the password field, the text is shown or it should be hidden. Is this intentional? Thank you. |
Hi @ziedmahdi. No, it's not intentional - it's a bug. Thanks for the report, we'll get to it soon. |
The
'uniforms-antd/TextField
does not properly pass thetype
prop. See below.For demonstration, I imported both antd and unstyled versions. The antd does not mask the input field as expected.
The text was updated successfully, but these errors were encountered: