Skip to content

Commit

Permalink
multiple input field open when selecting one (#4957)
Browse files Browse the repository at this point in the history
  • Loading branch information
asylves1 authored Sep 27, 2024
1 parent 0b9b98e commit 711f502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ onMounted(async () => {
return asset;
})
);
// .map((equation, index) => equation.name = `equation ${index+1}`)
}
if (equations.value && equations.value?.length > 0) {
clonedState.value.equations = equations.value;
}
isFetchingPDF.value = false;
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<tera-drilldown
:node="node"
v-bind="$attrs"
@update:selection="onSelection"
@on-close-clicked="emit('close')"
@update-state="(state: any) => emit('update-state', state)"
Expand Down Expand Up @@ -257,8 +258,8 @@ onMounted(async () => {
const state = cloneDeep(props.node.state);
state.equations = equations.map((e) => ({
name: e.name,
state.equations = equations.map((e, index) => ({
name: `${e.name} ${index}`,
includeInProcess: e.includeInProcess,
asset: { text: e.asset.metadata.text }
}));
Expand Down Expand Up @@ -347,8 +348,9 @@ function updateNodeLabel(id: string, label: string) {
function getEquations() {
const newEquations = multipleEquations.value.split('\n');
newEquations.forEach((equation) => {
const index = clonedState.value.equations.length;
clonedState.value.equations.push({
name: 'Equation',
name: `Equation ${index}`,
includeInProcess: true,
asset: {
text: equation
Expand Down

0 comments on commit 711f502

Please sign in to comment.