File tree Expand file tree Collapse file tree 5 files changed +18
-10
lines changed
Expand file tree Collapse file tree 5 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1616 <h1 >Gestion des catégories</h1 >
1717
1818 <div class =" header-wrapper" >
19- <div class =" input-wrapper--with-icon" >
19+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
2020 <Icon type =" search" />
21- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
21+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
2222 placeholder =" Rechercher" >
2323 </div >
2424
Original file line number Diff line number Diff line change 3939
4040
4141 <div class =" header-wrapper" >
42- <div class =" input-wrapper--with-icon" >
42+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
4343 <Icon type =" search" />
44- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
44+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
4545 placeholder =" Rechercher" >
4646 </div >
4747
Original file line number Diff line number Diff line change 2424 <h1 >Gestion des tags</h1 >
2525
2626 <div class =" header-wrapper" >
27- <div class =" input-wrapper--with-icon" >
27+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
2828 <Icon type =" search" />
29- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
29+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
3030 placeholder =" Rechercher" >
3131 </div >
3232
Original file line number Diff line number Diff line change 11<template >
22 <div class =" container--with-menu" >
33 <div class =" banner search-banner" >
4- <div class =" input-wrapper--with-icon" >
4+ <div class =" input-wrapper--with-icon one-third input-with--enter-icon " >
55 <Icon type =" search" />
6- <input ref =" inputText" class =" input--primary-color" type =" text" @keypress .enter =" debounceInput"
6+ <input ref =" inputText" class =" input--primary-color" type =" text" @input = " resetIfEmpty " @keydown .enter =" debounceInput"
77 placeholder =" Rechercher" >
88 </div >
99 </div >
8989 this .inputText .value = " "
9090 }
9191
92+ resetIfEmpty(e : any ) {
93+ const value: string = e .target .value ;
94+
95+ if (value === ' ' ) {
96+ this .$accessor .exercises .fetch ({data: {title: " " }});
97+ }
98+ }
99+
92100 refreshInput() {
93101 this .inputText .value = this .$accessor .exercises .search_criterion .title || ' ' ;
94102 }
Original file line number Diff line number Diff line change 3737 class =" init" >réinitialiser la recherche</span ></div >
3838
3939 <div class =" header-wrapper" >
40- <div class =" input-wrapper--with-icon" >
40+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
4141 <Icon type =" search" />
42- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
42+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
4343 placeholder =" Rechercher" >
4444 </div >
4545
You can’t perform that action at this time.
0 commit comments