Skip to content

Propagate defaults from source functions to WidgetSource #39

@donmccurdy

Description

@donmccurdy

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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions