feat(web): el almacén y el impuesto elegidos en la primera línea se copian a las de abajo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
155d18fce4
commit
43cba0cc3e
4 files changed
+53
-1
No files matched your search
@@ -141,7 +141,15 @@ export class LinesGrid {
|
||||
|
||||
private replace(row: number, line: GridLine, key: string): void {
|
||||
const next = this.recalc()?.(line, key) ?? line;
|
||||
this.lines.update((ls) => ls.map((l, i) => (i === row ? next : l)));
|
||||
const spread = row === 0 && this.columns().some((c) => c.key === key && c.propagate) && next[key] !== this.lines()[0]?.[key];
|
||||
this.lines.update((ls) =>
|
||||
ls.map((l, i) => {
|
||||
if (i === row) return next;
|
||||
if (!spread || i === 0) return l;
|
||||
const copy = { ...l, [key]: next[key] };
|
||||
return this.recalc()?.(copy, key) ?? copy;
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
// --- filas -----------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user