Skip to content

Commit

Permalink
remove loadData functionality from boundValue
Browse files Browse the repository at this point in the history
this goes hand in hand with harness-vue's change to handle synchronous behavior
  • Loading branch information
Alex Harding committed Sep 13, 2024
1 parent cdf8846 commit 490bddc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/inputs/utils/useBoundValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { computed } from "vue";

/**
* This function returns a computed variable for use with v-model, binding harness-vue store attributes to inputs.
* We use this instead of binding directly to the store so that we can intercept and enforce the "synchronous" behavior in the "set"
* This also allows us to use getFilter/setFilter, which we have listeners on for beforeSet/afterSet behavior
* We use this instead of binding directly to the store so that we are dispatching actions which may have subscriptions
* @param {Object} props Component Props
* @param {Object} harness the harness instance
* @returns {any} a vue computed
Expand All @@ -14,14 +13,11 @@ export default function useBoundValue(props, harness) {
try {
return harness.getFilter(props.filter.key);
} catch {
return "asd";
return null;
}
},
set(value) {
harness.setFilter(props.filter.key, value);
if (!props.synchronous && harness.pageDefinition.loadData) {
harness.loadData();
}
},
});
}

0 comments on commit 490bddc

Please sign in to comment.