linmasahiro / vue3-table-lite

A simple and lightweight data table component for Vue.js 3. Features sorting, paging, row check, dynamic data rendering, supported TypeScript, and more.
https://vue3-lite-table.vercel.app/
MIT License
248 stars 73 forks source link

How do I make the sortable icons disappear #118

Closed lilz-sofia closed 6 days ago

lilz-sofia commented 1 week ago

Issue:

I want to show the loaded data in a sorted order but I don't want to have the sort function enabled. I turned the sortable to false but doing that accumulate all the sort icons in one column. This might be my misunderstanding of the documentation, but I would really appreciate your guidance in here

Screenshot 2024-11-11 at 19 38 32

Ps: I just took a screenshot of the headers above. You can see how all the 3 sort icons gathered at ルーター column

Code:

This is my table configuration:

table: {
        columns: [
          {
            label: "管理ユニット名",
            field: "management_unit_name",
            sortable: false,
            width: '50%',
          },
          {
            label: "施設名",
            field: "management_unit_facility_name",
            sortable: false,
            width: '20%',
          },
          {
            label: "ルーター",
            field: "id",
            sortable: false,
            width: '20%',
          },
        ],
        sortable: {
          order: "id",
          sort: "asc",
        },
        messages: {
          pagingInfo: vm.$t('page_footer.available_items_info', {
            from: '{0}',
            to: '{1}',
            total: '{2}'
          }),
          pageSizeChangeLabel: vm.$t('page_footer.page_size_change_label') + ': ',
          gotoPageLabel: vm.$t('page_footer.go_to_page_label') + ': ',
          noDataAvailable: vm.$t('page_footer.no_data_available'),
        },
      },
linmasahiro commented 6 days ago

Hi @lilz-sofia Thanks for your issue, It was a bug and I am fixed it on v1.4.1 try upgrade to v1.4.1 please, if it resolved, close the issue, thanks.

lilz-sofia commented 6 days ago

Thank you for the quick fix! ^^ It's working correctly now