diff --git a/packages/eui/changelogs/upcoming/8307.md b/packages/eui/changelogs/upcoming/8307.md new file mode 100644 index 00000000000..2b926b5dd74 --- /dev/null +++ b/packages/eui/changelogs/upcoming/8307.md @@ -0,0 +1,2 @@ +- Updated `EuiInlineEditForm`'s `onCancel` prop type to allow uncontrolled mode usage + diff --git a/packages/eui/src/components/inline_edit/inline_edit_form.tsx b/packages/eui/src/components/inline_edit/inline_edit_form.tsx index 136f60c7a81..4f735a5aab5 100644 --- a/packages/eui/src/components/inline_edit/inline_edit_form.tsx +++ b/packages/eui/src/components/inline_edit/inline_edit_form.tsx @@ -96,6 +96,7 @@ export type EuiInlineEditCommonProps = Omit< * Initial inline edit text value */ defaultValue: string; + onCancel?: (previousValue: string) => void; }, { /** @@ -109,7 +110,7 @@ export type EuiInlineEditCommonProps = Omit< /** * Callback required to reset `value` to the previous read mode text value. */ - onCancel: (perviousValue: string) => void; + onCancel: (previousValue: string) => void; } >;