(props=dict())
| 7 | |
| 8 | |
| 9 | def get_app(props=dict()): |
| 10 | app = dash.Dash(__name__) |
| 11 | |
| 12 | baseProps = get_props() |
| 13 | |
| 14 | for i in range(len(baseProps["data"])): |
| 15 | datum = baseProps["data"][i] |
| 16 | |
| 17 | if datum["eee"] % 2 == 0: |
| 18 | datum.pop("eee") |
| 19 | elif datum["eee"] % 10 == 5: |
| 20 | datum["eee"] = "xx-{}-xx".format(datum["eee"]) |
| 21 | |
| 22 | for c in baseProps["columns"]: |
| 23 | if c["id"] == "rows": |
| 24 | c.update(dict(format=dict(specifier=".^5"))) |
| 25 | elif c["id"] == "ccc": |
| 26 | c.update( |
| 27 | dict( |
| 28 | format=dict( |
| 29 | locale=dict(separate_4digits=False), |
| 30 | prefix=1000, |
| 31 | specifier=".3f", |
| 32 | ) |
| 33 | ) |
| 34 | ) |
| 35 | elif c["id"] == "ddd": |
| 36 | c.update( |
| 37 | dict( |
| 38 | format=dict( |
| 39 | locale=dict(symbol=["eq. $", ""], separate_4digits=False), |
| 40 | nully=0, |
| 41 | specifier="$,.2f", |
| 42 | ), |
| 43 | on_change=dict(action="coerce", failure="default"), |
| 44 | validation=dict(allow_nully=True), |
| 45 | ) |
| 46 | ) |
| 47 | elif c["id"] == "eee": |
| 48 | c.update( |
| 49 | dict( |
| 50 | format=dict(nully="N/A", specifier=""), |
| 51 | on_change=dict(action="coerce", failure="default"), |
| 52 | ) |
| 53 | ) |
| 54 | |
| 55 | baseProps.update(dict(filter_action="native")) |
| 56 | baseProps.update(props) |
| 57 | |
| 58 | app.layout = DataTable(**baseProps) |
| 59 | |
| 60 | return app |
| 61 | |
| 62 | |
| 63 | def test_form001_can_edit_formatted_cells(test): |
no test coverage detected
searching dependent graphs…