fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

TextField required: Property "required" does not exist

Open LarsLiden opened this issue 9 years ago • 5 comments

Bug Report

  • Package version(s):^4.23.0

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? (No)

Requested priority: (Normal)

Products/sites affected: (if applicable) MS BLIS

Describe the issue:

Following the example in the documentation (see below) and getting the error shown above

<TextField required={ true } onChanged={this.contentChanged.bind(this)} label="Payload" placeholder="Payload..." value={this.state.contentVal} />

Actual behavior:

getting the error shown above (Property "required" does not exist)

Expected behavior:

should work like the sample

LarsLiden avatar Aug 04 '17 17:08 LarsLiden

Have you tried this with 4.31.0? We had a rough patch with typings mismatch. There shouldn't be anything wrong with the textfield required property.

micahgodbolt avatar Aug 08 '17 21:08 micahgodbolt

Hi @micahgodbolt ,

I have met this problem as well, and my version of office-ui-fabric-react is 4.31.0.

pchc2005 avatar Aug 09 '17 03:08 pchc2005

not only 'required'. This problem is also happened to 'name' and 'placeholder'.

pchc2005 avatar Aug 09 '17 03:08 pchc2005

In my case that was only an intellisense problem, since visual studio was using Typescript 2.2 for the intellisense, but wepack was really using the 2.4 version for the real transpiling process. All the properties that showed errors where defined in "d.ts" files from the 2.2 version.

The problem arised a few days ago (when the typing changed?). Then I realized I was still using TS 2.2, my solution was:

  1. Installed latest typescript version.
  2. Changed Visual Studio's intellisense settings to use 2.4 as explained here: https://github.com/Microsoft/TypeScript/wiki/Updating-TypeScript-in-Visual-Studio-2017 and got not more intellisense problems.

Hope it helps!

enriquin avatar Aug 10 '17 08:08 enriquin

Closing, please reply if any issues remain

erichdev avatar Oct 17 '17 00:10 erichdev