# Perspective table: odd behavior when selecting a range with sorted column

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-odd-behavior-when-selecting-a-range-with-sorted-column/35232>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 1, 2020, 10:38pm UTC](https://forum.inductiveautomation.com/t/perspective-table-odd-behavior-when-selecting-a-range-with-sorted-column/35232 "2020-06-01T22:38:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter.dolberg](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@peter.dolberg](https://forum.inductiveautomation.com/u/peter.dolberg)\
**Post date:** [June 1, 2020, 10:38pm UTC](https://forum.inductiveautomation.com/t/perspective-table-odd-behavior-when-selecting-a-range-with-sorted-column/35232/1 "2020-06-01T22:38:16Z")

</div>

**Platform**  
Perspective on Ignition 8.0.12  
Ubuntu 18.04  
Firefox 76 and Chrome 80

**What I did**  
I created a perspective table, made one of the columns sortable, and set the selection mode to “multiple interval”. When in a perspective session I click on the sortable column header to sort the data. Then I click a row and hold the shift key and click another row.

**What I expected**  
I expected the range of visible rows between my two clicks to be selected.

**What actually happened**

I got what seemed to be a random set of selected columns. After further investigation, I noticed the rows selected weren’t random, but instead were the range formed as if I had clicked those two rows when the data had not been sorted.

**Example**  
Below is a screenshot of me doing this. I used the perspective table default data, made the `city` column sortable, set the selection mode to `multiple interval`. Then in a browser I clicked `city` to sort it ascending. Then I clicked on the row with “Abidjan” then shift-clicked the row with “Bandung”.

 ![Screenshot from 2020-06-01 14-49-05](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6b6c408693a6bdfa537f002415928a0a9b8942b4.png)

You can see "Berlin, “Chicago” and “Dar es Salaam” are highlighted, which I wouldn’t expect when selecting a range between the top two rows.

**Additional information**

If I click the `city` header twice more to remove the sort on the column, then I can see that the selected rows form a single range based on the original order of the data. So I know the selection isn’t random, it’s based on the data’s original order. Unfortunately that isn’t helpful because I want to select a range based on the sort that I applied, not the data’s original order.

I noticed the same problem happens when sorting on any column. It also happens when the selection mode is “single interval”.

---

<div class="post-metadata">

**Author:** ![peter.dolberg](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@peter.dolberg](https://forum.inductiveautomation.com/u/peter.dolberg)\
**Post date:** [November 9, 2020, 4:50pm UTC](https://forum.inductiveautomation.com/t/perspective-table-odd-behavior-when-selecting-a-range-with-sorted-column/35232/2 "2020-11-09T16:50:17Z")

</div>

I tried to reproduce in Ignition 8.1.0 and this issue seems to be fixed.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 9, 2020, 5:43pm UTC](https://forum.inductiveautomation.com/t/perspective-table-odd-behavior-when-selecting-a-range-with-sorted-column/35232/3 "2020-11-09T17:43:57Z")

</div>

I’m surprised no one replied to this thread sooner. I just attempted to replicate it today believing that the original post was a new entry, but now I see that this was brought up quite some time ago. You are correct that this is no longer an issue in 8.1.0 or newer. It’s not clear when the fix was introduced, but I do see the desired behavior in current builds.

Also, excellent write-up; it was very easy to read and understand what you were encountering and expecting.
