Skip to content

Commit 18b9539

Browse files
mateusjmafjhonyeduardo
authored andcommitted
fix(combo): corrige links quebrados dos exemplos de heróis
Adicionada uma validação prévia a exibição do `p-primary-label` no `po-widget`. Fixes DTHFUI-865
1 parent d82a6dc commit 18b9539

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-heroes-reactive-form/sample-po-combo-heroes-reactive-form.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="po-row">
22
<po-widget
33
class="po-lg-6"
4-
p-primary-label="Know more"
4+
[p-primary-label]="knowMoreLabel"
55
(p-primary-action)="knowMore()">
66

77
<div [formGroup]="form">
@@ -33,7 +33,7 @@
3333
</po-info>
3434
</div>
3535

36-
<hr>
36+
<po-divider></po-divider>
3737

3838
<div class="po-row">
3939
<po-info

projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-heroes-reactive-form/sample-po-combo-heroes-reactive-form.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export class SamplePoComboHeroesReactiveFormComponent implements OnInit {
2121
});
2222
}
2323

24+
get knowMoreLabel() {
25+
return this.form.valid ? 'Know more' : undefined;
26+
}
27+
2428
knowMore() {
2529
const heroName = this.form.get('hero').value;
2630

projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-heroes/sample-po-combo-heroes.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="po-row">
22
<po-widget
33
class="po-lg-6"
4-
p-primary-label="Know more"
4+
[p-primary-label]="knowMoreLabel"
55
(p-primary-action)="knowMore(heroName)">
66

77
<po-combo
@@ -30,7 +30,7 @@
3030
</po-info>
3131
</div>
3232

33-
<hr>
33+
<po-divider></po-divider>
3434

3535
<div class="po-row">
3636
<po-info

projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-heroes/sample-po-combo-heroes.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export class SamplePoComboHeroesComponent {
1414

1515
constructor(private http: HttpClient) { }
1616

17+
get knowMoreLabel() {
18+
return this.heroName ? 'Know more' : undefined;
19+
}
20+
1721
knowMore(heroName: string) {
1822
window.open(`http://google.com/search?q=${heroName}`, '_blank');
1923
}

0 commit comments

Comments
 (0)