Get / watch the id(s) of the currently expanded record(s)

Hi,

This one is an API enhancement request.

I know that the Cursor allows me to get the record ids of selected records. But it doesn’t provide the ids of expanded records, which I recommend should be treated as “selected” as well, especially taking into account you can move to previous and next records from within the expanded record UI, by using the arrows above the record primary field.

I tried to work around that by trying and track changes to the top window location (i.e. the browser url), since it includes the record id of the expanded record:

https://airtable.com/activeTableId/activeViewId/expandedRecordId?blocks=blockId

Problem is that in dev mode (haven’t checked it in a release yet), I cannot access window.top.location - I get a cross origin error:

Uncaught DOMException: Blocked a frame with origin "https://devblock--....airtableblocks.com" from accessing a cross-origin frame.

Straight forward solution would be to get expanded record IDs as well via the Cursor.

Thanks,
Ronen

After putting some thought into it, it’s not as straightforward as selected records, since expanded records can be linked records (within linked records, within records, etc.), so the Cursor needs to provide the table id(s) fo each expanded record as well.

Some use cases (such as mine) will also require the view of the expanded record in order to be able to get the view meta data and figure out which fields are displayed and which are hidden.

Interesting! Can you share more about the user flow you have in mind?

Since expanded records cover up blocks right now, users can’t interact with blocks when a record is expanded.

Are you optimizing for when the user closes the expanded record and goes back to the block?

Hey Kasra, no, actually, I can still see my blocks (which is good for my use case), even though they are behind a semi transparent overlap. I will share screenshots of the block I’ve created that would require such functionality this week (if life doesn’t intervene :slight_smile:).

@Emma_Yeap, this block is also what you were asking about in this topic:

Best,
Ronen

1 Like