making column visible - column shown without header

making column visible - column shown without header

foxy_stoatfoxy_stoat Posts: 13Questions: 4Answers: 0

Hi

Great Project, wonder if someone could tell me if the following is a problem with my implementation or a datatable issue. Have read a few forum posts with regards the colvis and responsive extension and am a bit confused if they can be used in the way shown here.

Debug: https://debug.datatables.net/izacar

Problem: when making a column visible - new table column data is shown without a header when width should dictate only a responsive (+) row be used

Example of this problem is available here:

https://ovits.com.au/dt_prob/dt_prob_orders.php

Using Bootstrap4

Have 10 Columns in Editor
Display 8 by default, if space available (two set with visible:false)

Issue occurs on desktop and mobile browsers

On Desktop - Windows 10 with Firefox 79 (with enough width for all 8 columns), when adding a 9th Column to table (colvis button):

  1. If enough space available for new visible column it works as expected added column with header https://ovits.com.au/dt_prob/when_enough_space.png

  2. If (screen space / window) is smaller than what is needed: a responsive row (+) is added to row but also a data column without a header https://ovits.com.au/dt_prob/problem.png

A page refresh resolves the visual problem when stateSave: true - complete is shown in the (+) only https://ovits.com.au/dt_prob/refresh_no_problem.png

Mobile (Apple - Safari - Portrait)

Three columns shown by default - Click Visibility -> Complete https://ovits.com.au/dt_prob/ios_dt_prob.png

Steps to recreate on desktop:

Open page
Resize width of page so Acknowledge disappears inside a (+)
Resize width of page slightly to reshow Acknowledge
Select Visibility -> Complete OR "Show All"
Complete column will appear on right without header as well as in a (+) row
Refresh page
Table should only show Complete column in responsive (+) row only

Steps to recreate on mobile:

Open page
Select Visibility -> Complete OR "Show All"
Complete Column will appear on right without header as well as in a (+) row
Refresh page
Table should only show Complete column in responsive (+) row only

Thanks in advance for any advice / help

Pete

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Hi,

    I'm seeing that as well. It does indeed look like a bug in our software somewhere. I'm not immediately sure where though!

    Could you load in the nightly version of Responsive on your page please?

    Thanks,
    Allan

  • foxy_stoatfoxy_stoat Posts: 13Questions: 4Answers: 0

    Hi Allan
    thank you very much for your response, have updated the page. apologies for this not being a fiddle, not sure if its relevant but i did try using fixed data and could not reproduce issue, so it seemed like it was ajax related, thought it would just be easier to strip a real page - would be happy to give you access to this if it would help
    thanks pete

  • foxy_stoatfoxy_stoat Posts: 13Questions: 4Answers: 0

    just fyi here is a fixed data (no ajax) example where it works fine (or it seems to):

    https://ovits.com.au/dt_prob/dt_prob_orders_fixed.php

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    Thanks for updating the file!

    I've just made a small change to Responsive which I believe will fix this (it did when messing with variables on your site).

    The nightly will rebuild in about 5 minutes, so hopefully you'll be able to do a ctrl-f5 reload on your page soon to get the latest version of the file and it will "just work".

    Allan

  • foxy_stoatfoxy_stoat Posts: 13Questions: 4Answers: 0

    Hey Allan
    You are a legend, thank you so much for this fix, really appreciate your effort, datatables is an outstanding project but the support is on a different level altogether.
    if you are ever in Aus let me know as I owe you a beer
    Pete

This discussion has been closed.