Skip to content

Commit

Permalink
[REVERT ME] Added text to the InlineEditText example to display the u…
Browse files Browse the repository at this point in the history
…se of the onSave prop
  • Loading branch information
breehall committed Apr 19, 2023
1 parent 598cd09 commit 6005e53
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src-docs/src/views/inline_edit/inline_edit_text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default () => {
setToggleTextButtonSize(optionId);
};

const [testForOnSaveProp, setTestForOnSaveProp] = useState('');

return (
<>
<EuiButtonGroup
Expand All @@ -48,7 +50,15 @@ export default () => {
inputAriaLabel="Edit text inline"
defaultValue="Hello World!"
size={toggleTextButtonSize}
onSave={(onSaveVal) => {
setTestForOnSaveProp(onSaveVal);
}}
/>

<EuiSpacer />

<p>Test for onSave Prop below:</p>
<p>{testForOnSaveProp}</p>
</>
);
};

0 comments on commit 6005e53

Please sign in to comment.