MCPcopy Index your code
hub / github.com/plotly/dash / on_focus

Function on_focus

components/dash-table/tests/selenium/test_sizing.py:315–344  ·  view source on GitHub ↗
(test, props, data_fn)

Source from the content-addressed store, hash-verified

313
314
315def on_focus(test, props, data_fn):
316 app = dash.Dash(__name__)
317
318 baseProps1 = get_props(data_fn=data_fn)
319 baseProps2 = get_props(data_fn=data_fn)
320
321 baseProps1.update(dict(**props, id="table1"))
322 baseProps2.update(dict(**props, id="table2"))
323
324 app.layout = Div(
325 [
326 DataTable(**baseProps1),
327 DataTable(**baseProps2),
328 ]
329 )
330
331 test.start_server(app)
332
333 table2 = test.table("table2")
334
335 for i in range(len(baseProps1.get("columns"))):
336 table2.cell(0, i).click()
337
338 t1 = "#table1"
339 t2 = "#table2"
340
341 cells_are_same_width(test, t1, t1)
342 cells_are_same_width(test, t1, t2)
343
344 assert test.get_log_errors() == []

Callers 3

test_szng006_on_focusFunction · 0.90
test_szng004_on_focusFunction · 0.90
test_szng005_on_focusFunction · 0.90

Calls 11

get_propsFunction · 0.90
DivClass · 0.90
DataTableClass · 0.90
cells_are_same_widthFunction · 0.85
cellMethod · 0.80
get_log_errorsMethod · 0.80
updateMethod · 0.45
start_serverMethod · 0.45
tableMethod · 0.45
getMethod · 0.45
clickMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…