diff --git a/apps/mantine-react-table-docs/example-groups/DraggingExamples.tsx b/apps/mantine-react-table-docs/example-groups/DraggingExamples.tsx new file mode 100644 index 000000000..e7a155255 --- /dev/null +++ b/apps/mantine-react-table-docs/example-groups/DraggingExamples.tsx @@ -0,0 +1,45 @@ +import { useRouter } from 'next/router'; +import { Box, Tabs } from '@mantine/core'; +import ColumnOrdering from '../examples/enable-column-ordering'; +import RowOrdering from '../examples/enable-row-ordering'; +import RowDragging from '../examples/enable-row-dragging'; +import { useState } from 'react'; + +const DraggingExamples = ({ isPage = false }) => { + const { pathname, push } = useRouter(); + const [activeTab, setActiveTab] = useState( + isPage ? pathname.split('/').pop() : 'column-ordering', + ); + return ( + <> + + + isPage && newPath !== 'more' + ? push(newPath as string) + : setActiveTab(newPath as string) + } + keepMounted={false} + > + + Column Ordering + Row Ordering + Row Dragging + + + + + + + + + + + + + + ); +}; + +export default DraggingExamples; diff --git a/apps/mantine-react-table-docs/pages/docs/examples/column-ordering.mdx b/apps/mantine-react-table-docs/pages/docs/examples/column-ordering.mdx index e69de29bb..465248c83 100644 --- a/apps/mantine-react-table-docs/pages/docs/examples/column-ordering.mdx +++ b/apps/mantine-react-table-docs/pages/docs/examples/column-ordering.mdx @@ -0,0 +1,26 @@ +import Head from 'next/head'; +import Examples from '../../../example-groups/DraggingExamples'; + + + Column DnD Ordering Example - Mantine React Table Docs + + + + + +## Column DnD Ordering Example + +Mantine React Table has built-in support for column drag and drop re-ordering. Learn more about column ordering in the [Column Ordering Feature Guide](/docs/guides/column-ordering-dnd). + + + +View Extra Storybook **[Examples](https://www.mantine-react-table.dev/?path=/story/prop-playground--default)** diff --git a/apps/mantine-react-table-docs/pages/docs/examples/row-dragging.mdx b/apps/mantine-react-table-docs/pages/docs/examples/row-dragging.mdx index e69de29bb..85b09f168 100644 --- a/apps/mantine-react-table-docs/pages/docs/examples/row-dragging.mdx +++ b/apps/mantine-react-table-docs/pages/docs/examples/row-dragging.mdx @@ -0,0 +1,26 @@ +import Head from 'next/head'; +import Examples from '../../../example-groups/DraggingExamples'; + + + Row DnD Dragging Example - Mantine React Table Docs + + + + + +## Column DnD Ordering Example + +Mantine React Table has built-in support row drag and drop features that can be used in a variety of ways. Learn more about column ordering in the [Row Ordering/DnD Feature Guide](/docs/guides/row-ordering-dnd). + + + +View Extra Storybook **[Examples](https://www.mantine-react-table.dev/?path=/story/prop-playground--default)** diff --git a/apps/mantine-react-table-docs/pages/docs/examples/row-ordering.mdx b/apps/mantine-react-table-docs/pages/docs/examples/row-ordering.mdx index e69de29bb..ae5003087 100644 --- a/apps/mantine-react-table-docs/pages/docs/examples/row-ordering.mdx +++ b/apps/mantine-react-table-docs/pages/docs/examples/row-ordering.mdx @@ -0,0 +1,26 @@ +import Head from 'next/head'; +import Examples from '../../../example-groups/DraggingExamples'; + + + Row DnD Ordering Example - Mantine React Table Docs + + + + + +## Row DnD Ordering Example + +Mantine React Table has built-in support for row drag and drop re-ordering. Learn more about column ordering in the [Row Ordering Feature Guide](/docs/guides/row-ordering-dnd). + + + +View Extra Storybook **[Examples](https://www.mantine-react-table.dev/?path=/story/prop-playground--default)**