Skip to content

Commit

Permalink
fix(form): add data-pristine DOM attribute
Browse files Browse the repository at this point in the history
Pavel910 committed Aug 14, 2024
1 parent 0cd8b63 commit 829048c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/form/src/Form.tsx
Original file line number Diff line number Diff line change
@@ -116,7 +116,11 @@ function FormInner<T extends GenericFormData = GenericFormData>(
<FormContext.Provider value={formContext}>
{React.createElement(
"webiny-form-container",
{ onKeyDown: __onKeyDown, "data-testid": props["data-testid"] },
{
onKeyDown: __onKeyDown,
"data-testid": props["data-testid"],
"data-pristine": formApi.isPristine
},
children({
data: formApi.data,
setValue: formApi.setValue,

0 comments on commit 829048c

Please sign in to comment.