Commit c3029ab
Global
* fix: Add `viewGenerator` to default config
When installing the library in a project, the `viewGenerator` function
defined in the config object by the user did have no effect. The reason
for this was that properties not included in the default config object
(graph.config.js) were been ignored when building the graph and
rendering it in the browser.
In order to solve this issue, a `viewGenerator` property is now included
in the default config object, with an initial value of `null`.
* fix: Don't show function or null properties in sandbox
The current sandbox example created a form that allowed all of the
available config properties to be customized in real time.
The `viewGenerator` property, though, cannot be customized with a form.
Since its value must be a function, the user cannot set it via a form
field.
Also, the fact that it's initialized to null made some of the sandbox
examples to throw an error because the form schema generator doesn't
support neither null or undefined values. Functions are not allowed
either, and in this case an error would appear on screen by saying that
this type of data is not supported.
The current change filters the config elements so that neither null,
undefined or function values are included in the config form.
* test: Update expected value for `viewGenerator`viewGenerator included in default config object (#131)1 parent 387d516 commit c3029ab
File tree
3 files changed
+9
-6
lines changed- sandbox
- src/components/graph
- test/component/graph
3 files changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments