Skip to content

Commit 6b3ac31

Browse files
authored
New: Show isValud state in the formStateTable component (#122)
1 parent 5d6eea3 commit 6b3ac31

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/formStateTable.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ const FormStateTable = ({
4949
{formState.isValid ? 'true' : 'false'}
5050
</td>
5151
</tr>
52+
<tr>
53+
<td align="right" style={{ ...paraGraphDefaultStyle }}>
54+
Dirty:
55+
</td>
56+
<td
57+
style={{
58+
color: formState.isDirty ? colors.green : colors.lightPink,
59+
...paraGraphDefaultStyle,
60+
}}
61+
>
62+
{formState.isDirty ? 'true' : 'false'}
63+
</td>
64+
</tr>
5265
<tr>
5366
<td align="right" style={{ ...paraGraphDefaultStyle }}>
5467
Submitted:

0 commit comments

Comments
 (0)