fix: pressing shift +enter in task title field open the task desc
This commit is contained in:
@@ -836,6 +836,12 @@ const TaskInput = ({ onChoreUpdate, isModalOpen, onClose }) => {
|
||||
}}
|
||||
customRenderer={renderedParts}
|
||||
onEnterPressed={handleEnterPressed}
|
||||
onShiftEnterPressed={() => {
|
||||
if (!hasDescription) {
|
||||
setHasDescription(true)
|
||||
}
|
||||
setTimeout(() => richTextEditorRef.current?.focus(), 50)
|
||||
}}
|
||||
suggestions={{
|
||||
'#': {
|
||||
value: 'id',
|
||||
|
||||
@@ -52,6 +52,7 @@ const SmartTaskTitleInput = ({
|
||||
onChange,
|
||||
suggestions,
|
||||
onEnterPressed,
|
||||
onShiftEnterPressed,
|
||||
customRenderer,
|
||||
isNativeScanner,
|
||||
onScanClick,
|
||||
@@ -158,7 +159,11 @@ const SmartTaskTitleInput = ({
|
||||
} else {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault()
|
||||
if (onEnterPressed) {
|
||||
if (e.shiftKey) {
|
||||
if (onShiftEnterPressed) {
|
||||
onShiftEnterPressed(value)
|
||||
}
|
||||
} else if (onEnterPressed) {
|
||||
onEnterPressed(value)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user