File tree 3 files changed +6
-7
lines changed
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 6
6
from .version import __version__ # noqa: F401
7
7
from ._callback_context import CallbackContext as _CallbackContext
8
8
9
- callback = _CallbackContext ()
9
+ callback_context = _CallbackContext ()
Original file line number Diff line number Diff line change @@ -958,7 +958,7 @@ def dispatch(self):
958
958
'{}.{}' .format (x ['id' ], x ['property' ]): x .get ('value' )
959
959
for x in state
960
960
}
961
- flask .g .triggered_inputs = body .get ('changedProps ' )
961
+ flask .g .triggered_inputs = body .get ('changedPropIds ' )
962
962
963
963
for component_registration in self .callback_map [target_id ]['inputs' ]:
964
964
args .append ([
Original file line number Diff line number Diff line change @@ -589,11 +589,10 @@ def test_callback_context(self):
589
589
@app .callback (Output ('output' , 'children' ),
590
590
[Input (x , 'n_clicks' ) for x in btns ])
591
591
def on_click (* args ):
592
- print ('wtf' )
593
- if not dash .callback .triggered :
592
+ if not dash .callback_context .triggered :
594
593
raise PreventUpdate
595
- trigger = dash .callback .triggered [0 ]
596
- input_value = dash .callback .inputs .get (trigger )
594
+ trigger = dash .callback_context .triggered [0 ]
595
+ input_value = dash .callback_context .inputs .get (trigger )
597
596
return 'Just clicked {} for the {} time!' .format (
598
597
trigger .split ('.' )[0 ], input_value
599
598
)
@@ -616,4 +615,4 @@ def on_click(*args):
616
615
617
616
def test_no_callback_context (self ):
618
617
with self .assertRaises (MissingCallbackContextException ):
619
- no_context = dash .callback .inputs
618
+ no_context = dash .callback_context .inputs
You can’t perform that action at this time.
0 commit comments