Skip to content

Commit 2f968db

Browse files
authored
Adding the row data and googleSheetsRowNumber explicitly. (#1940)
Revving to v0.1.0
1 parent efa0c2b commit 2f968db

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

components/google_sheets/actions/find-row/find-row.mjs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import googleSheets from "../../google_sheets.app.mjs";
33
export default {
44
key: "google_sheets-find-row",
55
name: "Find Row",
6-
description: "Find a row by a column and value",
7-
version: "0.0.2",
6+
description: "Find one or more rows by a column and value",
7+
version: "0.1.0",
88
type: "action",
99
props: {
1010
googleSheets,
@@ -52,12 +52,17 @@ export default {
5252
spreadsheetId: this.sheetId,
5353
range: `${this.sheetName}!${this.column}:${this.column}`,
5454
})).data.values;
55-
const rowNumbers = [];
55+
56+
const rows = [];
5657
return colValues.reduce((values, value, index) => {
5758
if (value == this.value) {
58-
rowNumbers.push(index + 1);
59+
rows.push({
60+
value,
61+
index,
62+
googleSheetsRowNumber: index + 1,
63+
});
5964
}
60-
return rowNumbers;
65+
return rows;
6166
});
6267
},
6368
};

0 commit comments

Comments
 (0)