How do I create a password input using cloth ui?
There is a TextField input in the ui structure, but I haven't found a way to create a password field for the login form.
Edit:
I tried using the 'type' attribute, but I get an error.
Property 'type' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<TextField> & Readonly<{ children?: ReactNode; }>
These are the bundled packages from package.json:
"office-ui-fabric-react": "^4.21.4",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"typescript": "^2.4.2"
This issue seems to be similar to mine: https://github.com/OfficeDev/office-ui-fabric-react/issues/2203 - I tried to migrate to TypeScript 2.2.2 but I get tons of errors from the node_modules folder if I will do it.
UPDATE: The problem has been fixed. The packages have been updated and it no longer exists.
source to share
You tried:
<TextField defaultValue='foo' name='bar' type='password' />
See this issue: https://github.com/OfficeDev/office-ui-fabric-react/issues/1127
And this issue: https://github.com/OfficeDev/office-ui-fabric-react/issues/574
UPDATE with the answer to my problem on github:
micahgodbolt:
This was fixed some time ago. I do not have problems:
<TextField type='password' label='Default TextField' />
and getting this:
If it is a typescript issue, we are developing some bugs with the most recent version of TS. Make sure you update to the latest Fabric. I.E. it has nothing to do with the textbox and enters the password.
source to share
set type="password"
<TextField type="password" />
see also TextField type = "password" · Issue # 490 · OfficeDev / office-ui-fabric-react · GitHub
source to share