|
1 | 1 | import dash_core_components as dcc |
2 | 2 | import dash_html_components as html |
| 3 | +from dash_table import DataTable |
3 | 4 | import dash |
4 | 5 | from dash.dependencies import Input, Output |
5 | 6 |
|
|
8 | 9 | "not-boolean": { |
9 | 10 | "fail": True, |
10 | 11 | "name": 'simple "not a boolean" check', |
11 | | - "component": dcc.Graph, |
12 | | - "props": {"animate": 0}, |
| 12 | + "component": dcc.Input, |
| 13 | + "props": {"debounce": 0}, |
13 | 14 | }, |
14 | 15 | "missing-required-nested-prop": { |
15 | 16 | "fail": True, |
|
47 | 48 | "invalid-shape-1": { |
48 | 49 | "fail": True, |
49 | 50 | "name": "invalid key within nested object", |
50 | | - "component": dcc.Graph, |
51 | | - "props": {"config": {"asdf": "that"}}, |
| 51 | + "component": DataTable, |
| 52 | + "props": {"active_cell": {"asdf": "that"}}, |
52 | 53 | }, |
53 | 54 | "invalid-shape-2": { |
54 | 55 | "fail": True, |
55 | 56 | "name": "nested object with bad value", |
56 | | - "component": dcc.Graph, |
57 | | - "props": {"config": {"edits": {"legendPosition": "asdf"}}}, |
| 57 | + "component": DataTable, |
| 58 | + "props": { |
| 59 | + "columns": [{ |
| 60 | + "id": "id", |
| 61 | + "name": "name", |
| 62 | + "format": { |
| 63 | + "locale": "asdf" |
| 64 | + } |
| 65 | + }] |
| 66 | + }, |
58 | 67 | }, |
59 | 68 | "invalid-shape-3": { |
60 | 69 | "fail": True, |
61 | 70 | "name": "invalid oneOf within nested object", |
62 | | - "component": dcc.Graph, |
63 | | - "props": {"config": {"toImageButtonOptions": {"format": "asdf"}}}, |
| 71 | + "component": DataTable, |
| 72 | + "props": { |
| 73 | + "columns": [{ |
| 74 | + "id": "id", |
| 75 | + "name": "name", |
| 76 | + "on_change": { |
| 77 | + "action": "asdf" |
| 78 | + } |
| 79 | + }] |
| 80 | + }, |
64 | 81 | }, |
65 | 82 | "invalid-shape-4": { |
66 | 83 | "fail": True, |
67 | 84 | "name": "invalid key within deeply nested object", |
68 | | - "component": dcc.Graph, |
69 | | - "props": {"config": {"toImageButtonOptions": {"asdf": "test"}}}, |
| 85 | + "component": DataTable, |
| 86 | + "props": { |
| 87 | + "columns": [{ |
| 88 | + "id": "id", |
| 89 | + "name": "name", |
| 90 | + "on_change": { |
| 91 | + "asdf": "asdf" |
| 92 | + } |
| 93 | + }] |
| 94 | + }, |
70 | 95 | }, |
71 | 96 | "invalid-shape-5": { |
72 | 97 | "fail": True, |
|
88 | 113 | "no-properties": { |
89 | 114 | "fail": False, |
90 | 115 | "name": "no properties", |
91 | | - "component": dcc.Graph, |
| 116 | + "component": dcc.Input, |
92 | 117 | "props": {}, |
93 | 118 | }, |
94 | 119 | "nested-children": { |
|
112 | 137 | "nested-prop-failure": { |
113 | 138 | "fail": True, |
114 | 139 | "name": "nested string instead of number/null", |
115 | | - "component": dcc.Graph, |
| 140 | + "component": DataTable, |
116 | 141 | "props": { |
117 | | - "figure": {"data": [{}]}, |
118 | | - "config": { |
119 | | - "toImageButtonOptions": {"width": None, "height": "test"} |
120 | | - }, |
| 142 | + "columns": [{ |
| 143 | + "id": "id", |
| 144 | + "name": "name", |
| 145 | + "format": { |
| 146 | + "prefix": "asdf" |
| 147 | + } |
| 148 | + }] |
121 | 149 | }, |
122 | 150 | }, |
123 | 151 | "allow-null": { |
124 | 152 | "fail": False, |
125 | 153 | "name": "nested null", |
126 | | - "component": dcc.Graph, |
| 154 | + "component": DataTable, |
127 | 155 | "props": { |
128 | | - "figure": {"data": [{}]}, |
129 | | - "config": {"toImageButtonOptions": {"width": None, "height": None}}, |
| 156 | + "columns": [{ |
| 157 | + "id": "id", |
| 158 | + "name": "name", |
| 159 | + "format": { |
| 160 | + "prefix": None |
| 161 | + } |
| 162 | + }] |
130 | 163 | }, |
131 | 164 | }, |
132 | 165 | "allow-null-2": { |
|
0 commit comments