You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/10/29 20:08:24 UTC

[GitHub] [cloudstack-primate] ggoodrich-ipp commented on issue #3: Checklist: List View Customisation

ggoodrich-ipp commented on issue #3: Checklist: List View Customisation
URL: https://github.com/apache/cloudstack-primate/issues/3#issuecomment-547606780
 
 
   I have been investigating the sorting mechanism built into ant-design-vue in hopes of fulfilling the sort-key feature listed in the description. I've extracted some of the code leveraged by the old UI for sorting, in order to hopefully set the Table.sorter to call this new function. However, what I've discovered is that I can find no mechanism with which to determine which column is being clicked/sorted. The mechanism only passes (a, b, sortOrder), with a and b seeming to be Vue.js data objects that contain, essentially, the data for an entire row in the table. I've found a spot in the ant-design-vue code where I can pass another parameter - sortColumn as the fourth parameter, and this solves the problem. I've been testing it locally. If no-one knows of another good way to accomplish this, I will issue a PR against ant-design-vue to get this change incorporated.
   
   The referenced line would be changed to be:
   `const result = sortColumn.sorter(a, b, sortOrder, sortColumn);`
   
   Here is a [link to the current line](https://github.com/vueComponent/ant-design-vue/blob/46644ff435359c6a5c707444b3828bcb99258a74/components/table/Table.jsx#L351) within the ant-design-vue repo

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services