Skip to content

docs: callout for optional fields and native controls.#66902

Open
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:docs/optional-native-controls
Open

docs: callout for optional fields and native controls.#66902
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:docs/optional-native-controls

Conversation

@JeanMeche
Copy link
Member

No description provided.

@JeanMeche JeanMeche requested a review from mmalerba February 4, 2026 10:26
@angular-robot angular-robot bot added the area: docs Related to the documentation label Feb 4, 2026
@ngbot ngbot bot added this to the Backlog milestone Feb 4, 2026
@JeanMeche JeanMeche force-pushed the docs/optional-native-controls branch 2 times, most recently from 828e733 to 2991eaa Compare February 4, 2026 10:36
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Deployed adev-preview for 9708eb3 to: https://ng-dev-previews-fw--pr-angular-angular-66902-adev-prev-9350nogd.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@JeanMeche JeanMeche force-pushed the docs/optional-native-controls branch from 2991eaa to 9e83f80 Compare February 4, 2026 10:43
});
```

HELPFUL: Only custom control can support `null` values. Prefer empty values like `''` or `[]` if you intend to bind the `FieldTree` to a native control.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change this to say that native text controls like <input type=text> and <textarea> don't support null, use '' to represent an empty value

This is a little more precise since Date | null is accepted by <input type=date> and I believe if its not done already, we plan to allow <input type=number> to take null as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of the code I tried yesterday, <input type=number> does not take null. So glad you plan to allow it!

@JeanMeche JeanMeche force-pushed the docs/optional-native-controls branch 2 times, most recently from 909ff66 to d7faa81 Compare February 4, 2026 19:38
@JeanMeche JeanMeche requested a review from mmalerba February 4, 2026 19:43
@JeanMeche JeanMeche force-pushed the docs/optional-native-controls branch from d7faa81 to 9708eb3 Compare February 4, 2026 20:31
});
```

HELPFUL: Native text controls like <input type=text> and <textarea> don't support null, use '' to represent an empty value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: need to backtick these so they don't render as actual elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adev: preview area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants