Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web_component
submodule
Commits
add74c78
Commit
add74c78
authored
Jul 03, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
49d5daeb
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
378 additions
and
302 deletions
+378
-302
DragSorted.tsx
components/apolloTable/component/DragSorted.tsx
+28
-0
Table.tsx
components/apolloTable/component/Table.tsx
+350
-302
No files found.
components/apolloTable/component/DragSorted.tsx
0 → 100644
View file @
add74c78
import
React
,
{
useCallback
}
from
'react'
;
import
{
Draggable
}
from
'react-beautiful-dnd'
;
const
DragSorted
=
(
props
)
=>
{
// using useCallback is optional
const
onBeforeCapture
=
useCallback
(()
=>
{},
[]);
const
onBeforeDragStart
=
useCallback
(()
=>
{},
[]);
const
onDragStart
=
useCallback
(()
=>
{
debugger
;
},
[]);
const
onDragUpdate
=
useCallback
(()
=>
{},
[]);
const
onDragEnd
=
useCallback
(()
=>
{},
[]);
return
(
<
Draggable
draggableId=
"draggable-1"
index=
{
0
}
>
{
(
provided
,
snapshot
)
=>
(
<
div
ref=
{
provided
.
innerRef
}
{
...
provided
.
draggableProps
}
{
...
provided
.
dragHandleProps
}
>
{
props
.
children
}
</
div
>
)
}
</
Draggable
>
);
};
export
default
DragSorted
;
components/apolloTable/component/Table.tsx
View file @
add74c78
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment