[GH #2222] Checkbox type broke in 15.0

Tags: #<Tag:0x00007f51b8fbfa20> #<Tag:0x00007f51b8fbf8e0>

Upgraded from 14.6.1 to 15.0 and checkboxes disappeared. Returned to 14.6.1 and checkboxes came back. How to fix in 15.0?

columns: [{ data: 'ID', readOnly: true },
    { data: 'selectChkBx', type: 'checkbox' },
    { data: 'Name', readOnly: true },
    { data: 'Phone', readOnly: true },
    { data: 'VDate', readOnly: true },
    { data: 'GDate', readOnly: true },
    { data: 'HDate', readOnly: true },
    { data: 'SPP', readOnly: true }

Hi @dloendorf

We did not change anything regarding checkboxes. We still have the same setup https://handsontable.com/docs/javascript-data-grid/checkbox-cell-type/

Could you share a demo where the issue is replicable and check of there are any errors in the console?

Test

Hey @dloendorf it seems that your message was cut.

I also emailed you the html. If I open my post all is there. The html is not showing. How do I show html code in the post so all can see?

Okay - Here is a jsfiddle
Test Example No Checkbox

we recommend sharing sandboxes (as you did with JSFiddle example). Only then we can debug the code. Plus, forum script might be blocking some entries due to security reasons.

When it comes to checkboxes - as previously mentioned you use no theme so some of the elements need to be added manually (like arrows for sorting). Now the checkbox within a standard for will be added to 15.1.0 within this request https://github.com/handsontable/handsontable/pull/11427

We plan to publish the next version next week. I will keep you updated.

Thank you for the explanation. I went back and added themeName: ‘ht-theme-main’, to my fiddle. I assume it now has a theme, however the checkboxes are still not showing. https://jsfiddle.net/hop0dx3u/
Is there something else I am missing? Thanks for your help.

Hi @dloendorf,
the issue is the column widths. You have them set too small. Try this for column widths:

    colWidths: [100, 100, 100, 80, 100, 100, 100, 100],

Thanks

Hi @dloendorf

You can test the build with the fix using those resources

https://cdn.jsdelivr.net/npm/handsontable@15.1.0-next-dfdf994-20250206/dist/handsontable.full.min.js
https://cdn.jsdelivr.net/npm/handsontable@15.1.0-next-dfdf994-20250206/dist/handsontable.full.min.css

I added those links to the JSFiddle but still do not see checkboxes. What am I doing wrong? Thanks

Thank you! I assumed the stretchAll would proportionally stretch the widths. It did in 14.6.1. I will remove that option and set the widths.

I think you can either specify the column widths or use stretchAll.

1 Like