Get the underlying query after filtering a table
I imagine this is a unique request but is it possible to get the final DB query after you've sorted and filtered a table?
What I'm trying to accomplish (there might be better ways) is to take a table and allow a user to filter down and use the filtered results to send an email to all the ones left in the table. The problem comes in where a filtered table could, in theory, still contain thousands of records so I was thinking I could just grab the underlying query and do things on my own, where I'm not sure bulk actions would work with that much data and that many pages of data.
What I'm trying to accomplish (there might be better ways) is to take a table and allow a user to filter down and use the filtered results to send an email to all the ones left in the table. The problem comes in where a filtered table could, in theory, still contain thousands of records so I was thinking I could just grab the underlying query and do things on my own, where I'm not sure bulk actions would work with that much data and that many pages of data.