Save comment and description on ctrl+enter

This commit is contained in:
Austin Chen 2022-02-03 01:12:37 -08:00
parent d0766fa7c3
commit e7433c2eec

View File

@ -130,6 +130,11 @@ function FeedBet(props: { activityItem: any }) {
className="textarea textarea-bordered w-full" className="textarea textarea-bordered w-full"
placeholder="Add a comment..." placeholder="Add a comment..."
rows={3} rows={3}
onKeyDown={(e) => {
if (e.key === 'Enter' && e.ctrlKey) {
submitComment()
}
}}
/> />
<button <button
className="btn btn-outline btn-sm mt-1" className="btn btn-outline btn-sm mt-1"
@ -195,6 +200,11 @@ export function ContractDescription(props: {
description.length description.length
) )
} }
onKeyDown={(e) => {
if (e.key === 'Enter' && e.ctrlKey) {
saveDescription(e)
}
}}
/> />
<Row className="gap-2"> <Row className="gap-2">
<button <button