Radio Buttons in Table

Radio Buttons in Table

rdsrds Posts: 3Questions: 0Answers: 0
edited November 2013 in Bug reports
Problem:
When a datatable, enhanced from a plain html table, has radio buttons embedded in the row, the first row of buttons will not honor the checked attribute.

Cause:
When sizing columns, datatables creates a temporary row using copied information. The temporary row will have a copy of one the existing radio buttons with the checked attribute set. The new temporary row will show as selected. When datatables completes the sizing operation the temporary row is deleted, BUT the checked state is not restored in the original row.

Solution:
I have no idea. One possibility is when copying columns, make sure that copied radio buttons are unselected before being added.

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Can you link to a test case showing the issue please? It should be that the original row is used in the DataTable, while the sizing uses a clone that shouldn't effect the original rows.

    Thanks,
    Allan
  • rdsrds Posts: 3Questions: 0Answers: 0
    I don't have a place to host it, but I do have a minimal test case I could send. A 1 column, 2 row table, default options except sScrollY. Without sScrollY it doesn't occur.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    JSFiddle and http://live.datatables.net are available for test cases to be created and hosted on.

    Allan
  • rdsrds Posts: 3Questions: 0Answers: 0
    Did not know that. Ok:

    http://live.datatables.net/eyogar
  • rsprinklersprinkle Posts: 3Questions: 0Answers: 0
    Any update on the status of this issue? I can post a possible patch if that would be helpful. My main concern is that I would rather not maintain an out of tree set of patches.
This discussion has been closed.