Skip to content

Commit b637603

Browse files
fluent-ui: Allow value of 0 in TextWidget (#2497)
* Update TextWidget.tsx Fixes proper undefined/null check and not falsy check. when value is 0 its changed to "" instead of "0" * Update packages/fluent-ui/src/TextWidget/TextWidget.tsx Co-authored-by: Ashwin Ramaswami <[email protected]>
1 parent dffebb7 commit b637603

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/fluent-ui/src/TextWidget/TextWidget.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const TextWidget = ({
8484
// TODO: once fluent-ui supports the name prop, we can add it back in here.
8585
// name={name}
8686
type={inputType as string}
87-
value={value ? value : ""}
87+
value={value || value === 0 ? value : ""}
8888
onChange={_onChange as any}
8989
onBlur={_onBlur}
9090
onFocus={_onFocus}

0 commit comments

Comments
 (0)