score:0
i think you can do it like this
{
key: 'id',
title: 'name',
dataindex: 'nameid',
fixed: 'left',
sorter: true
},
score:0
according to this example, you can add sorter: (a, b) => a.nameid - b.nameid,
to your columns object, then you can sort the table by nameid by clicking the "name"
{
key: 'name',
title: 'name',
dataindex: 'name',
fixed: 'left',
sorter: (a, b) => a.name.localecompare(b.name)
},
Source: stackoverflow.com
Related Query
- Antd table - sorting by a value other than dataIndex
- Handle Pagination Sorting and Filtering Separately in Antd Table React
- Antd tree table grouped by column value
- React-Datepicker with Formik and Yup: Date value not validated on first blur, other than .required()
- how to display a value other than the renderValue in material ui select
- Fetch the value of props other than "value" from a custom component?
- how to disable datepicker depending on value in select tag in ANTD table
- When selecting an option in a dropdown, how do I change the state with onChange but with a value other than the one inside the option tags
- Ant design select - search and filter options other than value say title or key
- React-table: How to sort table data based on the changed cell value (override the default sorting with cell props.value)?
- React antd nested table and drag & drop sorting
- How do i access another column from related table other than the foreign key, when creating an API view
- Antd design table column -> how to pass array of objects to dataIndex
- Setting default value of formic field to 0 as to show the field filled with innitial value of 0 other than being empty
- 'Expected to return a value at the end of arrow function' - Is there another way to do this other than filter?
- How to immediately update summary value, when column value in antd Table changes?
- How can sort Antd table data by length, when the data contain a null value
- Set value of 1st input into 2nd input when using antd table in react
- AntD Table navigate to other route on click
- Auto submit a dropdown when a value is selected other than the first value?
- In reactjs, On hover a row of the table should change background of row of other table with same row index value
- Next.js Global CSS cannot be imported from files other than your Custom <App>
- how to sort a table in alphabetical order with antd
- How to filter on ANTD table when the column is a JSON array instead of a string
- antd - ant design table with pagination control supporting a widget to choose rows per page?
- CSS for colouring one row of antd table in react
- How to set value dynamically inside Form.List using setFieldsValue in Antd 4?
- How can I set default sorter and filters on antd table components?
- how to get field value on change for FormItem in antd
- How can i change the cell colour in ANTD table according to the value?
More Query from same tag
- React: Search form input not clearing from state by setting state of input to empty array
- React decrypt an encrypted string from NodeJS
- How to set dynamically prop to a component in reactjs
- How to update values of useRef variables in a useEffect
- How to Change pre filled input values
- How do I update "read" to true in all the children of messages in firebase database
- filtering through array of strings doesn't include the first character
- How to show street numbers over the colored polygon in google maps?
- How to close a Drawer from another React Component?
- Redux + React how to change only one element value in array full of objects? I have working app, just want to make sure I do it right
- How do I reuse knobs in Storybook's Component Story Format (CSF)?
- React with Typescript .filter gives me error
- How is it that binding a method inside the constructor is different from binding it inside the call to React.cloneElement?
- Define striped color in react-data-table-component
- Is there a way to disable the auto collapse on react-bootstrap's accordion
- How to have a button on-click without a button look?
- Dynamic API routing with getServerSideProps in Nextjs
- React functional component using state
- reactjs is giving me a invariant Violation error for changing a parent's state with a callback
- Why is the span element rendered by the Text component from the Grommet library, able to get margin-top?
- Providing initialValues for an array in final-form-arrays causes state changes to reset the whole form, how can i prevent this?
- Can't use "startIcon" & "endIcon" from <Button/> API of Material-UI
- Strange behavior/loading patterns when using React + Meteor pre-filling forms
- How to overried the selected classes in menuItem in material ui REACTjs?
- TypeError: Cannot read property 'opacity' of null
- How do I make new fields appear in the form based upon a selection
- Conditional alternating Parent tags in jsx
- how to redirect to another page if condition true
- What in React should actually be rendered
- React MaterialUI Button with RouterLink Component - how to pass Exact property?