Skip to content

Commit 396f344

Browse files
committed
0.4.2 - adjust usage.py
The `callback` is replaced by `app.callback` in `usage.py`.
1 parent e5d8c91 commit 396f344

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
1. Fix: Improve the sanitization of the input data. Previously, the sanitization does not work correctly if the `data` is specified by `None`.
1212

13+
#### :floppy_disk: Change
14+
15+
1. The `callback` is replaced by `app.callback` in `usage.py`.
16+
1317
### 0.4.1 @ 10/26/2024
1418

1519
#### :mega: New

usage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"""
1919

2020
import dash
21-
from dash import Dash, dcc, callback, html, Input, Output, State
21+
from dash import Dash, dcc, html, Input, Output, State
2222
import dash_json_grid
2323

2424
app = Dash(__name__)
@@ -140,21 +140,21 @@
140140
)
141141

142142

143-
@callback(Output("viewer", "theme"), Input("theme", "value"))
143+
@app.callback(Output("viewer", "theme"), Input("theme", "value"))
144144
def update_theme(value):
145145
if not value:
146146
return dash.no_update
147147
return value
148148

149149

150-
@callback(Output("viewer", "search_text"), Input("search", "value"))
150+
@app.callback(Output("viewer", "search_text"), Input("search", "value"))
151151
def update_search(value):
152152
if not value:
153153
return None
154154
return value
155155

156156

157-
@callback(
157+
@app.callback(
158158
Output("selected-path", "children"),
159159
Output("selected-val", "children"),
160160
Output("viewer", "data"),

0 commit comments

Comments
 (0)