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>
Thank you so much!