Skip to content

Commit 6005e53

Browse files
committed
[REVERT ME] Added text to the InlineEditText example to display the use of the onSave prop
1 parent 598cd09 commit 6005e53

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src-docs/src/views/inline_edit/inline_edit_text.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default () => {
3131
setToggleTextButtonSize(optionId);
3232
};
3333

34+
const [testForOnSaveProp, setTestForOnSaveProp] = useState('');
35+
3436
return (
3537
<>
3638
<EuiButtonGroup
@@ -48,7 +50,15 @@ export default () => {
4850
inputAriaLabel="Edit text inline"
4951
defaultValue="Hello World!"
5052
size={toggleTextButtonSize}
53+
onSave={(onSaveVal) => {
54+
setTestForOnSaveProp(onSaveVal);
55+
}}
5156
/>
57+
58+
<EuiSpacer />
59+
60+
<p>Test for onSave Prop below:</p>
61+
<p>{testForOnSaveProp}</p>
5262
</>
5363
);
5464
};

0 commit comments

Comments
 (0)