Currently we assign defaults in the source functions...
|
const { |
|
aggregationExp, |
|
aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_H3, |
|
sqlQuery, |
|
spatialDataColumn = 'h3', |
|
queryParameters, |
|
filters, |
|
} = options; |
... but these defaults are not assigned to the original options object, and so are not passed down into the WidgetSource. To avoid a lot of redundancy assigning the defaults again later for widget-related functions, it would be better if the defaults were assigned once and propagated down into the WidgetSource from there, where more of the properties could be considered 'required'.
Currently we assign defaults in the source functions...
carto-api-client/src/sources/h3-query-source.ts
Lines 35 to 42 in 4d5b9c7
... but these defaults are not assigned to the original
optionsobject, and so are not passed down into the WidgetSource. To avoid a lot of redundancy assigning the defaults again later for widget-related functions, it would be better if the defaults were assigned once and propagated down into the WidgetSource from there, where more of the properties could be considered 'required'.