Sorting by values in Details' custom columns

Greetings,

I created a FileManager component with a couple of custom columns ('owner' and 'shared' here) and getting rid of the 'Modified' column:

    detailsViewSettings: {
      columns: [
        {
          field: 'name',
          headerText: 'Name',
          minWidth: 120,
          width: 'auto',
          template: '${name}'
        },
        {
          field: 'owner',
          headerText: 'Owner',
          width: 'auto',
          template: '${owner}',
          type: 'text',
        },
        {
          field: 'shared',
          headerText: 'Shared',
          width: 'auto',
          template: '${shared}',
          type: 'text',
        },
        {
          field: '_fm_modified',
          headerText: 'Modified',
          minWidth: 50,
          width: '190',
          format: 'E d, y H:m',
        }
      ],
    },

Which is effectively reflected in the Details view - it will show the checkbox column, the name column, owner and shared columns and the Modified column.

But those custom columns aren't being shown in the popup menu that shows clicking the 'Sort by' toolbar button - it still shows the default column values:

Screenshot_20240201_113940.png

Even if I click that 'Size' menu item, JS will throw an error. I can't find anything related to this in the documentation to include said custom columns in this menu (besides the 'allowSorting' option, which it says it's enabled by default for all columns), is there any approach to make this menu reflect the columns being used and make it able to sort by said custom column values?


1 Reply

JA Jafar Ali Shahulhameed Syncfusion Team February 5, 2024 02:46 PM UTC

Hi acidrums4,


We appreciate your inquiry regarding the customization of columns in the Details view and the ability to sort items using the toolbar in Syncfusion File Manager component. Upon thorough examination, we regret to inform you that the current implementation of the File Manager component does not support sorting items directly from the toolbar when custom columns are added in the Details view. It's important to note that while sorting is available within the Details view, it cannot be extended to the toolbar for custom columns.


Kindly get back to us if you need further assistance.


Regards,

Jafar


Loader.
Up arrow icon