Skip to content

Commit

Permalink
chore: move hook useOrder to root
Browse files Browse the repository at this point in the history
  • Loading branch information
santiago.trigo committed Dec 29, 2023
1 parent e11b743 commit 74a2af7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/table/src/helpers/orderDataByOrderStruct.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OrderColumn } from '../core/hooks/useOrderStruct';
import { OrderColumn } from '../hooks/useOrderStruct';
import { Data } from '../declarations';
import { orderDataByOrderStruct } from './orderDataByOrderStruct';

Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/helpers/orderDataByOrderStruct.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OrderColumn } from '../core/hooks/useOrderStruct';
import { OrderColumn } from '../hooks/useOrderStruct';

const order = (orderStruct, a, b) => {
for (const { sort, id } of orderStruct) {
Expand Down
1 change: 1 addition & 0 deletions packages/table/src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from './useWrapperObserver';
export * from './useTableScroll';
export * from './useTableVirtualizationColumn';
export * from './useTableVirtualizationRow';
export * from './useOrderStruct';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OrderColumn, useOrderStruct } from './useOrderStruct';
import { renderHook } from '@testing-library/react';
import { OrderColumn, useOrderStruct } from './useOrderStruct';

describe('getOptionsFromData', () => {
const cases: [string, OrderColumn[], string, OrderColumn[]][] = [
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/table/src/recipes/OrderTable.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { Meta, StoryObj } from '@storybook/react';
import { BasicTable } from './BasicTable';
import { useOrderStruct } from '../core/hooks/useOrderStruct';
import { useOrderStruct } from '../hooks/useOrderStruct';
import { ColDef } from '../declarations';
import { orderDataByOrderStruct } from '../helpers/orderDataByOrderStruct';

Expand Down

0 comments on commit 74a2af7

Please sign in to comment.