I'm looking to create almost a drop-down feature in Google Sheets. I was hoping to have arrows set that could potentially collapse rows when clicked.
It would be amazing if I could get it so each main "title" row has an arrow, that would cause the rows to either hide/unhide.
Since only the titles would be written in column A, I was thinking it might be possibly for a script to recognize the blank cells in between two filled ones?
So far I only have this, which is basically useless:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
// Hides the first three rows
sheet.hideRows(1, 3);
In a perfect world, the spreadsheet would look something like this, with the functionality to collapse the rows with the click of the arrow.
https://docs.google.com/spreadsheets/d/1-oGawFoPXjdHvadxXsSFxuZWWdOxN9ZgbvS10jelWZY/edit?usp=sharing
Not sure if this is possible, but if there is any hope/ideas I'd love to hear them.

