Open simonffox opened 2 years ago
Ok so I figured out a workaround for this. If the page is zoomed out or big enough, the Type column shows up. When you download a CSV, only the columns which are visible on the browser screen are placed in the CSV.
Did you post this on github? I'm hoping to have some time after meeting with Kevin to look at these bugs
On Tue, Nov 22, 2022 at 9:59 AM simonffox @.***> wrote:
Ok so I figured out a workaround for this. If the page is zoomed out or big enough, the Type column shows up. When you download a CSV, only the columns which are visible on the browser screen are placed in the CSV.
— Reply to this email directly, view it on GitHub https://github.com/BAMRU-Tech/bamru_net/issues/631#issuecomment-1324052336, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUPLABKX2FFABT37X7G5SLWJUCZNANCNFSM6AAAAAARSMQZTY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I made a change in branch 631 to change the column selector for exportOptions from { columns: ':visible' }
to { columns: ':not(.noVis)' }
.
Column visibility responsively changes based on screen size (debatable at a later date) and, in effect, changes the exported table data as Simon noticed. I agree that this is unexpected behavior.
I assume this logic was originally put in place to suppress exporting data that is not visible at all (such as user id, event id, and other data passed from the backend). These not-ever-visible columns are given the class .noVis (For example, event_detail.html:362 assigns status_order
column with class noVis
.
I have updated all table exports (members, events, messages, and anything else that uses our base_ftable
)
Note: This is my first time using datatables & I'm a Jquery selector notice, at best
On https://bamru.net/event/ when you generate a CSV or Excel doc of past events, the event "Type" is not recorded in the data.