app-tutor-ai-consumer 1.25.0 → 1.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [1.25.1](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.25.0...v1.25.1) (2025-08-12)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- qa issues part 2 ([203cb3c](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/203cb3c87d0abbdc6024e53c27ff3f91294a0bdb))
|
|
6
|
+
|
|
1
7
|
# [1.25.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.24.3...v1.25.0) (2025-08-12)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -21,12 +21,6 @@ describe('ChatInput', () => {
|
|
|
21
21
|
])
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
it('should call focus when rendering the input', () => {
|
|
25
|
-
renderComponent()
|
|
26
|
-
|
|
27
|
-
expect(ref.current).toHaveFocus()
|
|
28
|
-
})
|
|
29
|
-
|
|
30
24
|
it('should call setValue when ref change event is called', () => {
|
|
31
25
|
renderComponent()
|
|
32
26
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef,
|
|
1
|
+
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import type { ChangeEvent, KeyboardEvent } from 'react'
|
|
4
4
|
import { useTranslation } from 'react-i18next'
|
|
@@ -40,25 +40,6 @@ const ChatInput = forwardRef<HTMLTextAreaElement, ChatInputProps>(
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const setInputFocus = useCallback(() => {
|
|
44
|
-
if (inputDisabled) return
|
|
45
|
-
|
|
46
|
-
const input = ref?.current
|
|
47
|
-
|
|
48
|
-
if (input === document.activeElement) return
|
|
49
|
-
|
|
50
|
-
if (input) {
|
|
51
|
-
input.focus()
|
|
52
|
-
|
|
53
|
-
const position = input.textLength ?? 0
|
|
54
|
-
input.setSelectionRange(position, position)
|
|
55
|
-
}
|
|
56
|
-
}, [inputDisabled])
|
|
57
|
-
|
|
58
|
-
useEffect(() => {
|
|
59
|
-
setInputFocus()
|
|
60
|
-
}, [setInputFocus])
|
|
61
|
-
|
|
62
43
|
return (
|
|
63
44
|
<div
|
|
64
45
|
className={clsx(
|