Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 12, 2024
1 parent 924067e commit 632522e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/renderer/src/stories/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,17 @@ export class Table extends LitElement {
this.#itemProps = { ...this.#itemSchema.properties };
}

getRowName = (row) => (this.keyColumn ? Object.entries(this.data).find(([k, v]) => v[rowSymbol] === row)?.[0] : row);
getRowName = (row) =>
this.keyColumn ? Object.entries(this.data).find(([k, v]) => v[rowSymbol] === row)?.[0] : row;

revalidate = (skipped = []) => {
this.table.getData().forEach((rowData, i) => {
rowData.forEach((value, j) => {
const isSkipped = skipped.find(( { row, prop } ) => row === i && j === prop);
const isSkipped = skipped.find(({ row, prop }) => row === i && j === prop);
if (!isSkipped) this.table.setDataAtCell(i, j, value);
})
})

}
});
});
};

updated() {
const div = (this.shadowRoot ?? this).querySelector("div");
Expand Down Expand Up @@ -543,7 +543,7 @@ export class Table extends LitElement {
delete target[rowName];
delete unresolved[row];
Object.defineProperty(this.data[value], rowSymbol, { value: row, configurable: true }); // Setting row tracker
this.revalidate([ { row, prop } ]);
this.revalidate([{ row, prop }]);
}
}

Expand All @@ -569,7 +569,6 @@ export class Table extends LitElement {
}

this.onUpdate(rowName, header, value);

}

validated++;
Expand Down

0 comments on commit 632522e

Please sign in to comment.