docs: callout for optional fields and native controls.#66902
docs: callout for optional fields and native controls.#66902JeanMeche wants to merge 1 commit intoangular:mainfrom
Conversation
828e733 to
2991eaa
Compare
|
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. |
2991eaa to
9e83f80
Compare
adev/src/content/guide/forms/signals/designing-your-form-model.md
Outdated
Show resolved
Hide resolved
| }); | ||
| ``` | ||
|
|
||
| HELPFUL: Only custom control can support `null` values. Prefer empty values like `''` or `[]` if you intend to bind the `FieldTree` to a native control. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
As of the code I tried yesterday, <input type=number> does not take null. So glad you plan to allow it!
909ff66 to
d7faa81
Compare
d7faa81 to
9708eb3
Compare
| }); | ||
| ``` | ||
|
|
||
| HELPFUL: Native text controls like <input type=text> and <textarea> don't support null, use '' to represent an empty value. |
There was a problem hiding this comment.
nit: need to backtick these so they don't render as actual elements
No description provided.