Hi Dojo,
I have a Table component on my Low Code app, which displays IP information.
When we try the sort the Column with the IP information, the sorting is currently done as a 'string'. As can be seen on the image below.
Would there be any way we can get this to sort as an 'IP Address'? This would greatly improve the user experience when looking through the information.
Thanks for the help!
As Toon already mentioned, there is currently no way yet to get a custom sort order for columns; they all use the default comparison for their column type.
A possible solution is to use a custom operator in the following way:
- Remove the original 'Network address' string column
- Add a new 'Sortable network address' column of type integer
- Fill in the cells of the new column as such:
- Value = the IP address ranking
- DisplayValue = the original IP address string
This ensures that the user only sees the IP string and never the underlying integer ranking.
It also still allows the user to sort dynamically by clicking the column header.
The script could look something like this:
Brilliant solution Ronald! Do note that this has some smaller implications (such as it will now be treated as an integer column in all operators, the feeding capabilities will be different, etc.).