Skip to content

Commit ed08489

Browse files
authored
Merge pull request #10428 from Aikain/fix-code-example
Fix invalid code example in Fields-docs
2 parents f49743c + 37afc64 commit ed08489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ const TextField = (props) => {
520520
- const record = useRecordContext();
521521
+ const value = useFieldValue(props);
522522
- return record ? <span>{record[props.source]}</span> : null;
523-
+ return <span>{value}</span> : null;
523+
+ return value ? <span>{value}</span> : null;
524524
}
525525

526526
export default TextField;

0 commit comments

Comments
 (0)