Преглед на файлове

Table: allow omitting prop if sort-method is provided

Leopoldthecoder преди 8 години
родител
ревизия
0966662dc0
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      packages/table/src/util.js

+ 1 - 1
packages/table/src/util.js

@@ -21,7 +21,7 @@ export const orderBy = function(array, sortKey, reverse, sortMethod) {
   if (typeof reverse === 'string') {
     reverse = reverse === 'descending' ? -1 : 1;
   }
-  if (!sortKey) {
+  if (!sortKey && !sortMethod) {
     return array;
   }
   const order = (reverse && reverse < 0) ? -1 : 1;