Skip to content

Commit

Permalink
Add clear button to example
Browse files Browse the repository at this point in the history
  • Loading branch information
yhy-1 committed Apr 25, 2024
1 parent db39957 commit e305c11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions website/docs/examples/ControlledFocusedNode/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ function ControlledFocusedNode() {
<label htmlFor="txtIdToFocus">Node ID to focus:</label>
<input id="txtIdToFocus" type="text" onKeyDown={onKeyDown} />
<button onClick={() => getFocusId()}>Set</button>
<div>
<button onClick={() => setFocusId(undefined)}>
Clear focused node
</button>
</div>
</div>
<div className="checkbox">
<TreeView
Expand Down

0 comments on commit e305c11

Please sign in to comment.