Skip to content

enableMultiRemove attribute is invalid #4946

Description

@dcycurry

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions