Skip to content

Commit 4e2432b

Browse files
mateusjmafjhosefmarks
authored andcommitted
fix(lookup): corrige comportamento focal na tabulação do html
Agora o componente respeita a ordem da tabulação entre o tabindex dos demais elementos da tela e também remove a sobreposição da navegação entre os mesmos. Fixes DTHFUI-2482
1 parent 2751773 commit 4e2432b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-register/sample-po-dynamic-form-register.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class SamplePoDynamicFormRegisterComponent {
2727
{ label: 'Rio de Janeiro', value: 3 },
2828
{ label: 'Minas Gerais', value: 4 }
2929
]},
30-
{ property: 'city', disabled: true },
30+
{ property: 'city', disabled: true, gridColumns: 6 },
3131
{ property: 'entryTime', label: 'Entry time', type: 'time', divider: 'Work data', gridColumns: 6 },
3232
{ property: 'exitTime', label: 'Exit time', type: 'time', gridColumns: 6 },
3333
{ property: 'wage', type: 'currency', gridColumns: 6 },
@@ -43,7 +43,7 @@ export class SamplePoDynamicFormRegisterComponent {
4343
property: 'favoriteHero',
4444
gridColumns: 6,
4545
gridSmColumns: 12,
46-
label: 'Favorite Hero',
46+
label: 'Favorite hero',
4747
searchService: 'https://thf.totvs.com.br/sample/api/comboOption/heroes',
4848
columns: [ { property: 'nickname', label: 'Hero' }, { property: 'label', label: 'Name' }]
4949
},

projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
(blur)="searchEvent()">
1515

1616
<div class="po-field-icon-container-right">
17-
<span tabindex="1" #iconLookup (click)="openLookup()" (focus)="inp.focus()" class="po-icon po-field-icon po-icon-search"
17+
<span #iconLookup
18+
class="po-icon po-field-icon po-icon-search"
19+
tabindex="-1"
20+
[class.po-field-icon]="!disabled"
1821
[class.po-field-icon-disabled]="disabled"
19-
[class.po-field-icon]="!disabled">
22+
(click)="openLookup()"
23+
(focus)="inp.focus()">
2024
</span>
2125
</div>
2226
</div>

projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const routes: Routes = [
3636
{ path: '', redirectTo: 'home', pathMatch: 'full' }
3737
];
3838

39-
describe('PoLookupComponent: ', () => {
39+
describe('PoLookupComponent:', () => {
4040
let component: PoLookupComponent;
4141
let fixture: ComponentFixture<PoLookupComponent>;
4242
const fakeSubscription = <any>{ unsubscribe: () => {} };
@@ -119,7 +119,7 @@ describe('PoLookupComponent: ', () => {
119119

120120
});
121121

122-
describe('Methods: ', () => {
122+
describe('Methods:', () => {
123123
const objectSelected = { label: 'teste', value: 123 };
124124

125125
it('searchEvent: should call `searchById` when the current value isn`t equal to the old value.',

0 commit comments

Comments
 (0)