Icons duplicates with columnControl

Icons duplicates with columnControl

deepinodeepino Posts: 3Questions: 1Answers: 0
edited September 10 in Free community support

Sorry I can’t provide a test case, but the code that generates the table is based on a wrapper used across all the tables in the application, so it would be difficult for me to extract one.

At the moment I’m using the following extensions without any issues:
* DataTables 2.3.2
* Buttons 3.2.3
* Column visibility 3.2.3
* ColReorder 2.1.1
* FixedColumns 5.0.4
* FixedHeader 4.0.3
* SearchPanes 2.3.3
* Select 3.0.1

But if I add ColumnControl and set an option, the same icons get duplicated multiple times on each column. So for now I’d like to understand whether there’s a specific scenario in which the icons are created multiple times for the same column.

The only strange thing is that this behavior occurs when the data has more than one row, or maybe columns.

The data is passed as an array of objects.

On the columns object datamost of the time return null so rendercan have access to the full item of the array

https://datatables.net/extensions/columncontrol/examples/initialisation/multipleButtons.html

        columnControl: ['order', 'searchDropdown'],
        ordering: {
            indicators: false,
            handler: false
        }

If needed, I’ll try to prepare a test case or something similar later on.

Answers

  • deepinodeepino Posts: 3Questions: 1Answers: 0

    Your debug code is: ivaxib
    If this can be of any help.

  • allanallan Posts: 65,058Questions: 1Answers: 10,773 Site admin

    A test case would be very welcome please. I haven't seen anything like that, and it isn't in happening in the examples, so I'd need to be able to debug it to understand what is going wrong.

    Regards,
    Allan

  • deepinodeepino Posts: 3Questions: 1Answers: 0

    Okay, when I have some time, I'll try to create a test case on https://live.datatables.net/
    to recreate the situation. Thank you!

  • mkfgomezmkfgomez Posts: 1Questions: 0Answers: 0

    I have this same issue. It is inserting a second <span> into each div, like below.

    <div class="dt-column-header">
        <span class="dt-column-title"></span>
            <span class="dtcc">...</span>
            <span class="dtcc">...</span>
    </div>
    

    I haven't been able to reproduce it with the clean data at live.datatables.net but I'm creating my table using PHP and SQL, so it must be something I'm doing in creating the table. I'm using Bootstrap 5 and jQuery. I thought maybe it was because I was using a very outdated jQuery CDN file, but updating didn't fix this.

  • allanallan Posts: 65,058Questions: 1Answers: 10,773 Site admin

    Seems it isn't just an isolated issue then. If you could provide a link to your page showing the issue that would be useful, because at the moment I can't see the problem and thus can't debug it.

    Allan

Sign In or Register to comment.