Unable to use custom datasource in listView

Hi Syncfusion Team,

I am currently trying the example ("Group template" tab) from this url: https://ej2.syncfusion.com/react/documentation/listview/customizing-templates/ . I am unable use my data below as dataSource for ListView to do sorting. It does not sort. However, if i change all the "name" field into "text" field, it will work. Is there anyway to change the field name from "text" to "name" field? 


Thank you, appreciate all your help.


const originalData = [
{
name: 'Jenifer',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
{
name: 'Amenda',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
{
name: 'Isabella',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
{
name: 'William ',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
{
name: 'Jacob',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
{
name: 'Matthew',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
{
name: 'Oliver',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
{
name: 'Charlotte',
count: Math.round(Math.random() * 100),
image: 'images/cp.png',
},
];


<ListViewComponent
id="list"
dataSource={originalData}
sortOrder={sortOrder}
width="100%"
template={listTemplate}
fields={fields}
cssClass="e-list-template"
></ListViewComponent>




3 Replies

SS Sharon Sanchez Selvaraj Syncfusion Team August 19, 2021 07:10 PM UTC

Hi Eddy, 
 
Sorry for the inconvenience. 
 
We were able to replicate the mentioned issue “Sort order is not applied for ListView template while mapping different text field” and have considered this as a bug from our end. The fix for this issue will be included in our third weekly patch release. 
 
Please track the below feedback link to know the status of the issue. 
 
 
Please get back to us if you need any further assistance. 
 
Regards, 
 
Sharon Sanchez S. 



EM Eddy Mackonade August 25, 2021 05:29 AM UTC

Thank you so much!



KR Keerthana Rajendran Syncfusion Team August 26, 2021 06:45 AM UTC

Hi Eddy, 

Most welcome. We will update the status of this issue through the provided feedback link by the month of September. 


Regards, 
Keerthana. 


Loader.
Up arrow icon