Skip to content

Two columns with same sorting criteria displays incorrectly #52

@Ugoku

Description

@Ugoku

Consider the following code:

<table ts-wrapper>
    <tr>
        <th ts-criteria="startdate">Start date
        <th ts-criteria="startdate">Start time
        <th ts-criteria="other">Other column
        <th ts-criteria="something">Something else
    <tr ng-repeat="row in rows" ts-repeat>
        <td>{{ row.startdate | date }}
        <td>{{ row.startdate | date:'shortTime' }}
        <th>{{ row.other }}
        <th>{{ row.something }}
</table>

We use this to display a bunch of rows with varying start dates. We first had it without the ts-criteria on the "Start time" column.
However, when only one day is shown, some users found it confusing they had to click "Start date" to sort by start time, since the date was the same everywhere. So we wanted to add a sortable "Start time" column, which sorts by the same data as "Start date"

This works fine, as long as you don't sort by "start date" first, then by " start time", or the other way around. What you get then is this:

multisort

Is this something that can be fixed, or is there some way to work around this?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions