on 04-12-2023 6:43 PM
Hi Experts,
I have a UI table and the data is getting refreshed every 10 seconds which is mapped to a JSON model and when I try to sort my column either ascending or descending and during the data refresh the sorting is not working, So how do I keep the column sorting active all the time?
Thanks & Regards,
Vinodkumar.
don't create jsonmodel every time when you get new data.
you should use
yourexistingjsonmodel.setData(newData)
what does the onDataReceived do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<Table
id="idProductsTable"
items="{
path: '/data',
sorter: {
path: 'name',
descending: true
}
}"
>
<columns>
<Column
sortProperty="name"
width="13rem">
<Text text="Name"/>
</Column>
<Column
sortProperty="category"
width="13rem">
<Text text="Category"/>
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{name}"/>
<Text text="{category}"/>
</cells>
</ColumnListItem>
<
Just give you an sample or hint to include sorting in your data refresh logic itself.. instead of you sorting it during event refresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.