File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ export default class extends Controller {
5
5
6
6
inputTargetConnected ( ) {
7
7
this . setSearchClearIcon ( )
8
+ // Ensure the cursor is at the end of the input
9
+ this . inputTarget . selectionStart =
10
+ this . inputTarget . selectionEnd =
11
+ this . inputTarget . value . length
8
12
}
9
13
10
14
disconnect ( ) {
Original file line number Diff line number Diff line change 1
- < turbo-frame data-turbo-permanent id ="nav-conversations ">
1
+ < turbo-frame id ="nav-conversations ">
2
2
< section id ="search "
3
3
class ="pt-6 text-gray-950 dark:text-gray-100 select-none "
4
4
>
17
17
w-full
18
18
p-2 py-1
19
19
border border-gray-200 rounded-lg
20
- text-black dark:text-gray-800
20
+ text-black dark:text-gray-200
21
+ placeholder-gray-300 dark:placeholder-gray-500
22
+ bg-transparent
21
23
| ,
22
24
data : {
23
25
search_target : "input" ,
24
- turbo_permanent : true ,
25
26
action : %|
26
27
blur->search#unfocus
27
28
input->search#search
Original file line number Diff line number Diff line change 27
27
28
28
< turbo-frame id ="nav-conversations "
29
29
src ="<%= conversations_path ( conversation_id : @conversation &.id ) %> "
30
+ refresh ="morph "
30
31
loading ="lazy "
31
32
/>
You can’t perform that action at this time.
0 commit comments