Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate defaults from source functions to WidgetSource #39

Open
donmccurdy opened this issue Dec 4, 2024 · 0 comments
Open

Propagate defaults from source functions to WidgetSource #39

donmccurdy opened this issue Dec 4, 2024 · 0 comments

Comments

@donmccurdy
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant