mirror of
https://github.com/sigmasternchen/threadule
synced 2025-03-15 08:09:01 +00:00
fix: fixed problems with drag and drop
This commit is contained in:
parent
21c9deaa49
commit
51aa1712fd
2 changed files with 8 additions and 5 deletions
|
@ -102,9 +102,8 @@ const AccountCard: FunctionComponent<AccountCardProps> = (
|
|||
open={Boolean(editThread)}
|
||||
initial={editThread ? editThread : emptyThread(account)}
|
||||
onSubmit={(thread) => {
|
||||
thread.tweets.forEach(t => {
|
||||
t.id = undefined
|
||||
})
|
||||
thread = {...thread}
|
||||
thread.tweets = thread.tweets.map(t => ({...t, id: undefined}))
|
||||
|
||||
const endpoint = new ThreadEndpoint(client)
|
||||
const onSuccess = (result: Thread) => {
|
||||
|
|
|
@ -59,7 +59,7 @@ const Index: FunctionComponent<ThreadFormProps> = (
|
|||
return (
|
||||
<Dialog open={open}>
|
||||
<DialogTitle title={"Thread"}/>
|
||||
<DialogContent>
|
||||
<DialogContent style={{overflowY: "unset"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<TextField
|
||||
|
@ -102,7 +102,11 @@ const Index: FunctionComponent<ThreadFormProps> = (
|
|||
>
|
||||
{
|
||||
thread.tweets.map((tweet, index) => (
|
||||
<Draggable draggableId={tweet.id!} index={index}>
|
||||
<Draggable
|
||||
draggableId={tweet.id!}
|
||||
index={index}
|
||||
key={tweet.id!}
|
||||
>
|
||||
{(provided, snapshot) => (
|
||||
<Grid
|
||||
container
|
||||
|
|
Loading…
Reference in a new issue