Skip to content

Commit

Permalink
moving setFilter to be async
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Harding committed Sep 13, 2024
1 parent 633d993 commit 805f3b3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export default function getActions(pageDefinition) {
const actions = {};
const filters = pageDefinition.filters();
for (const filterKey in filters) {
const filterAction = function (payload) {
const filterAction = async function (payload) {
this[`${filterKey}Filter`] = payload;
};
const optionsAction = function (payload) {
const optionsAction = async function (payload) {
this[`${filterKey}Options`] = payload;
};
actions[`set${capitalize(filterKey)}Filter`] = filterAction;
Expand Down Expand Up @@ -67,9 +67,6 @@ export default function getActions(pageDefinition) {
.loadData(pageDefinition, pageStore)
.then(function (response) {
return response;
})
.catch(function (error) {
throw Error(error);
});
for (const chartKey in pageDefinition.charts()) {
if (data[chartKey] === null) {
Expand Down

0 comments on commit 805f3b3

Please sign in to comment.