Skip to content

Commit

Permalink
fix: minor fix for submitting mutation payload
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Dec 12, 2024
1 parent aade030 commit 160b32a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export default defineComponent({
items.value[index].label = props.label;
}
emit('update:modelValue', items.value);
return;
}
Expand All @@ -111,6 +113,8 @@ export default defineComponent({
const nextIndex = index - 1;
currentIndex.value = nextIndex < 0 ? 0 : nextIndex;
emit('update:modelValue', items.value);
};
const handleSaved = (data: FormTab) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default defineComponent({

<BModal
v-model="modal"
:hide-footer="true"
:no-footer="true"
:size="'lg'"
>
<template #header="props">
Expand Down
15 changes: 9 additions & 6 deletions packages/mtb/src/runtime/components/core/search/MSearchForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,15 @@ export default defineComponent({
mutations.value &&
mutations.value.length > 0
) {
payload.geneAlterations = {
items: mutations.value.map((item) => item.data).filter(Boolean),
operator: mutationsInCombination.value ?
LogicalOperator.AND :
LogicalOperator.OR,
};
const mutationItems = mutations.value.map((item) => item.data).filter(Boolean);
if (mutationItems.length > 0) {
payload.geneAlterations = {
items: mutationItems,
operator: mutationsInCombination.value ?
LogicalOperator.AND :
LogicalOperator.OR,
};
}
}

return payload;
Expand Down

0 comments on commit 160b32a

Please sign in to comment.