File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
components/google_sheets/actions/find-row Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import googleSheets from "../../google_sheets.app.mjs";
33export 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} ;
You can’t perform that action at this time.
0 commit comments