mirror of
https://github.com/liufree/obsidian-querydash.git
synced 2026-07-22 05:41:49 +00:00
fix: fix the bug of the same key
This commit is contained in:
parent
76da314a45
commit
69fa85fb83
1 changed files with 3 additions and 1 deletions
|
|
@ -66,13 +66,14 @@ const TableView: React.FC<ViewProps> = ({app, source}) => {
|
|||
|
||||
const rows: Array<Record<string, any>> = [];
|
||||
|
||||
value.values.forEach((row: any) => {
|
||||
value.values.forEach((row: any,rowIndex: number) => {
|
||||
const values: Record<string, any> = {};
|
||||
headers.forEach((header, index) => {
|
||||
const value = row[index];
|
||||
const resValue = formatValue(value);
|
||||
values[header] = resValue;
|
||||
});
|
||||
values['key'] = rowIndex; // Add a unique key for each row
|
||||
rows.push(values);
|
||||
});
|
||||
|
||||
|
|
@ -138,6 +139,7 @@ const TableView: React.FC<ViewProps> = ({app, source}) => {
|
|||
// console.log('value: ', value);
|
||||
},
|
||||
}}
|
||||
rowKey={(record) => record.key}
|
||||
search={{
|
||||
labelWidth: 'auto',
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue