Skip to content

Commit

Permalink
fix weights being lost when editing a drip list (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
efstajas committed Jun 10, 2024
1 parent b0e6960 commit 6158527
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/components/list-editor/list-editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
let percentagesManuallyChanged = false;
// If the component is initialized with existing weights, we don't want to auto-distribute equally on edit.
onMount(() => {
if (Object.keys(items).length > 0) {
percentagesManuallyChanged = true;
}
});
function adjustWeights(weights: Weights) {
const result = { ...weights };
Expand Down

0 comments on commit 6158527

Please sign in to comment.