react-trello icon indicating copy to clipboard operation
react-trello copied to clipboard

Does laneSortFunction work?

Open a19i23 opened this issue 4 years ago • 0 comments

Describe the bug I am trying to sort cards within the lanes by a certain number value. I supplied a function and some kind of sorting seems to happen but not what I expected

To Reproduce Steps to reproduce the behavior:

  1. add a function to sort by some value in card like below
function laneSortFunction(card1, card2) {
  return card1.id > card2.id;
}

return (
  <Board
    ...
    laneSortFunction={laneSortFunction}
  />

Expected behavior I expect the card with the bigger id to be in the top spot in the lane and all other cards beneath this one would be ordered in descending order based on the id.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version: 86.0.4240.198 (Official Build) (x86_64)

a19i23 avatar Dec 02 '20 19:12 a19i23