# Table column sort property doesn't update and doesn't do anything

**URL:** <https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [May 7, 2025, 6:49pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000 "2025-05-07T18:49:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Dolan](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Tyler\_Dolan](https://forum.inductiveautomation.com/u/Tyler_Dolan)\
**Post date:** [May 7, 2025, 6:49pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/1 "2025-05-07T18:49:33Z")

</div>

Ignition version 8.1.45

#### Problem

Clicking on the sort icon on the column header sorts the column, but it doesn't update the sort property for that column. Similarly, setting the sort property doesn't sort the column.

#### To reproduce

1. Create new view
2. Insert Table component
3. Add three columns to Table.props.columns and set the field properties to city, country, and population to match the default table data respectively.
4. Set the sort property of the city column to ascending.
5. Table is not sorted.

Alternatively

1. Create new view
2. Insert Table component
3. Add three columns to Table.props.columns and set the field properties to city, country, and population to match the default table data respectively.
4. Enable preview mode.
5. Click on the sort arrow next to the city column header.
6. The sort property for the city column does not change.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 7, 2025, 7:13pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/2 "2025-05-07T19:13:53Z")

</div>

From [Perspective - Table | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table#properties)

> **sortOrder**  
> The default weighted order in which columns and their contents are sorted relative to other columns and their contents. Used when the component loads.For **sortOrder** to be applied, the table must meet the following requirements:
> 
> - Objects under the **columns** array must be defined for each column in the table's underlying data property you wish to display and sort on.
> - In addition, each object under columns must have the **field** setting set to the data item under the data property (for example, "population" in the table's default data set).
> - **sortable** must be enabled.
> - **sort** must be set to something other than none.
> 
> Once all columns have been configured, the sortOrder can be configured.Each element in the **sortOrder** array is expected to be a string value representing the name of the column (as determined by **field** value in the columns array). For example, sorting by population first, city second, and country last, would look like the following:[image]

It works on initial load at least. I'd have to play with it some more.

* * *

I'm beginning to think that all those properties, `columns.x.sort`, and `sortOrder` are only related to first load. If so they are read-only on load, don't change by user interaction with the table header and don't react to programming.

I wonder if there's a way to retrigger, like `refreshBinding()`?

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [May 7, 2025, 7:14pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/3 "2025-05-07T19:14:38Z")

</div>

Make sure you have defined the "render" property from 'auto' to your column data type (string, I guess).

---

<div class="post-metadata">

**Author:** ![Tyler\_Dolan](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Tyler\_Dolan](https://forum.inductiveautomation.com/u/Tyler_Dolan)\
**Post date:** [May 7, 2025, 8:00pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/4 "2025-05-07T20:00:19Z")

</div>

The problem still persists with the column render property set

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 7, 2025, 8:42pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/5 "2025-05-07T20:42:39Z")

</div>

~~From @Transistor 's reply, are the names of your columns in the`field` props? Without that, _nothing_ will work as the column config doesn't know what to work _on_~~

Forgive me, this is only my 30 something'th year speaking English, I still can't read 🙂

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 7, 2025, 9:00pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/6 "2025-05-07T21:00:07Z")

</div>

Yes, he has specified that in the sample setup. I've replicated it.

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 6:28am UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/7 "2025-05-08T06:28:42Z")

</div>

> [@Transistor](#):
>
> are only related to first load

Seconded.

They added a `pager.activeOption` setting in 8.1.45 because `pager.initialOption` didn’t work at runtime.

> **[Perspective - Table | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table#:~:text=pager%20option.array-,activeOption,-Changed%20in%208.1.45)**
>
> The Table component displays database data in tabular form.

I pre-sort my data

---

<div class="post-metadata">

**Author:** ![Tyler\_Dolan](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Tyler\_Dolan](https://forum.inductiveautomation.com/u/Tyler_Dolan)\
**Post date:** [May 9, 2025, 2:23pm UTC](https://forum.inductiveautomation.com/t/table-column-sort-property-doesnt-update-and-doesnt-do-anything/106000/8 "2025-05-09T14:23:54Z")

</div>

My end goal is to pre-sort my data as well. However it would be nice to be able to use the table's sorting UI and sorting properties to provide input for the query. I had to make my own sorting component to do what I want, which is cumbersome and redundant.
