Sort all cells

Tags: #<Tag:0x00007fbe90bc9520>


I am using columnSorting in the settings. However when the table is sorted just the visible cells that are sorted. Is there a way to sort even the invisible cells?


Hi @Yacine

what are the

invisible cells

If you mean hidden cells (by hiddenRows plugin) - those are filterable and sortable

Hi @aleksandra_budnik

it is cells which contains complementary data for each row.( hidden column)

ex :

hotData =[[“visibleData”,“visibleData”,“invisible data”], [visibleData-2",“visibleData-2”,“invisible data-2”]]

         hotTableSettings: {
            colWidths: 150,
            rowHeights : 50,
            autoRowSize: false,
            autoColumnSize: false,
            colHeaders: true,
            rowHeaders: true,
            contextMenu: true,
            columnSorting: true,
		    sortIndicator: true,
		    dropdownMenu: true,
		    filters: true

          groupColumnSettings: {
            title: 'Group',
            type: 'text',
            readOnly: false
	      subGroupColumnSettings: {
	        title: 'Subgroup',
	        type: 'text',
	        readOnly: false

    		<hot-table  id="hot" ref="hotTableComponent" :settings="hotTableSettings":data="hotData ">
		    	<hot-column :settings="groupColumnSettings"></hot-column>
	    		<hot-column :settings="subGroupColumnSettings"></hot-column></hot-table>

When i sort the table, just the first two columns of hotData that are sorted.

Could you please pass the code to a sandbox? Is that Vue?

Yes that is Vue.

It’s okay, I did it.
I used the hook “afterColumnSort”, and in myCallback I sort my hotData according to the order and column retrieved from myCallback parameters.


Thank you for the update,

We can then call the topic closed as solved.