Skip to content
Source
Sign inSign up
TanStack/table

enableMultiRemove attribute is invalid #4946

Send to my agent
Closeddcycurry(GitHub profile, opens in a new tab) opened this issue 0 comments

Describe the bug

I can use the getNextSortingOrder method, but I can't pass parameters, so the value of multi is always false, the enableMultiRemove is invalid

getNextSortingOrder: () => SortDirection | false

getNextSortingOrder: (multi?: boolean) => {
  const firstSortDirection = column.getFirstSortDir()
  const isSorted = column.getIsSorted()

  if (!isSorted) {
    return firstSortDirection
  }

  if (
    isSorted !== firstSortDirection &&
    (table.options.enableSortingRemoval ?? true) && 
    (multi ? table.options.enableMultiRemove ?? true : true) 
  ) {
    return false
  }
  return isSorted === 'desc' ? 'asc' : 'desc'
},

Your minimal, reproducible example

none

Steps to reproduce

none

Expected behavior

none

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

none

react-table version

v17.0.2

TypeScript version

No response

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
  1. KevinVandy closed this

Sign in to join this conversation.