How to use `document.querySelector` with non-string IDs in `clientside_callback`?

Hello @ctdunc,

For the grid, you can use this:

el = dash_ag_grid.getApi(id).gridBodyCtrl.eBodyViewport.parentNode.parentNode.parentNode.parentNode.parentNode

At least for the time being.

You could also stringifyId and then replace the {} from it with nothing and query it like this:

document.querySelector(`div[id*='${stringifyId(id).replace('{','').replace('}','')}']`)

I’d also suggest a test to make sure that the id is what you are looking for, something like:

el.id == stringifyId(id)

Just to be sure you didnt get some other matches, and possibly only use this method if the id is an object vs a string.