File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ export default function NewComment({ updateId }: { updateId: string }) {
8787 < div className = "min-w-0 flex-1" >
8888 < form onSubmit = { handleSubmit ( onSubmit ) } >
8989 < TextArea
90+ id = { `new-comment-${ updateId } ` }
9091 ref = { register ( { required : true } ) }
9192 label = "Comment"
9293 name = "description"
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { User } from 'src/pages/members'
1616import { useMutation , useQueryClient } from 'react-query'
1717import toast from 'react-hot-toast'
1818import ListModal from '../modal/ListModal'
19+ import { scrollToContentWithId } from 'src/utils'
1920
2021export type GoalUpdateType = {
2122 id : string
@@ -229,7 +230,11 @@ export default function UpdateComment({
229230 < Button
230231 variant = "ghost"
231232 leadingIcon = { Chats }
232- isDisabled = { true }
233+ onClick = { ( ) => {
234+ const id = `new-comment-${ comment . updateId } `
235+ document . getElementById ( id ) . focus ( )
236+ scrollToContentWithId ( id )
237+ } }
233238 >
234239 Reply
235240 </ Button >
You can’t perform that action at this time.
0 commit comments