Skip to content

Commit

Permalink
✨ Make sure portals are scoped to component by using a unique id gene… (
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-m-santos authored Nov 30, 2022
2 parents 766968e + a0062fc commit 8e738b5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/components/core/lume-chart/lume-chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<vue-portal
v-if="allOptions.withLegend !== false"
:disabled="allOptions.legendPosition !== 'bottom'"
to="legend-bottom"
:to="`legend-bottom-${chartID}`"
slim
>
<lume-chart-legend
Expand Down Expand Up @@ -146,7 +146,7 @@

<!-- bottom chart legend -->
<vue-portal-target
name="legend-bottom"
:name="`legend-bottom-${chartID}`"
slim
/>
</template>
Expand Down Expand Up @@ -239,13 +239,8 @@ export default defineComponent({
const { allOptions } = useOptions<ChartOptions>(options);
const { internalData, computedLabels, containerSize, updateSize } = useBase(
data,
labels,
color,
allOptions,
orientation
);
const { internalData, computedLabels, containerSize, updateSize, chartID } =
useBase(data, labels, color, allOptions, orientation);
const { xScale, yScale } = useBaseScales(
internalData,
Expand Down Expand Up @@ -395,6 +390,7 @@ export default defineComponent({
updateSize,
xAxisTitle,
yAxisTitle,
chartID,
};
},
});
Expand Down

0 comments on commit 8e738b5

Please sign in to comment.