T
TanStack2y ago
dependent-tan

Table Sorting not working if the table body cell has different icons

Is there any way to sort icons in react-table. I'm kinda stuck that if the table has different icons and I wanna sort icons just like we sort text. In the following code I've icons in column 3.
const Row = (allTopic || []).map((topic) => { return { id: topic?.id, col1: topic?.name, col2: topic?.isDemo ? 'lock_open' : 'lock', col3: ( <CommonIconButton disabled onClick={() => push(/school/${topic?.id})} icon={topic?.isHidden ? 'visibility_off' : 'visibility'} /> ), col4: topic?.yearGroups?.length > 0 ? topic?.yearGroups?.map((y) => y?.shortName).join(', ') : '-', col5: topic?.subject, col6: topic?.domain?.title, col7: topic?.video }; });
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?