Skip to content

Commit e13dd22

Browse files
committed
Remove unnecessary empty hide() code from panels Quick Start tutorial
1 parent dc85859 commit e13dd22

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

tutorials/quick-start-panel/index.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ function create() {}
113113

114114
function show(event) {}
115115

116-
function hide(event) {}
117-
118116
function update(selection) {}
119117

120118
module.exports = {
@@ -234,19 +232,7 @@ This code does the following:
234232
1. The `show` lifecycle method gives you access to an `event` argument which includes a `node` property that you can attach your user interface to.
235233
2. Adds the panel UI container returned from the `create` helper function to `event.node` if `panel` does not exist in the dom already.
236234

237-
#### Remove the UI
238-
239-
One of the optional lifecycle methods for panels is `hide`, which runs when the user navigates away from your panel.
240-
241-
```js
242-
function hide(event) { // [1]
243-
// This function triggers when the panel is hidden by user
244-
}
245-
```
246-
247-
This code does the following:
248-
249-
1. The `event` argument that is passed includes a `node` property, just like we saw for the `show` lifecycle method.
235+
You can also optionally provide a `hide` lifecycle method for your panel, but we don't need to for this example.
250236

251237
#### Update your UI
252238

@@ -288,7 +274,6 @@ module.exports = {
288274
panels: {
289275
enlargeRectangle: {
290276
show,
291-
hide,
292277
update
293278
}
294279
}

0 commit comments

Comments
 (0)