Additional Styles for TabPanel

UI Components for Angular
Post Reply
CC84
Posts: 69
Joined: 11 Mar 2016, 09:32

22 Mar 2016, 09:47

I'd like to style my TabPanel Header depending on the form state inside the Tabpanel.

Something like this:
<p-tabPanel header="MyPanel" [class.invalid]="!MyPanelForm.valid">
Currently there is no <p-tabPanel> Element in the Dom, so there is no element to write the class to. Would it be possible to write <p-tabPanel> to the DOM or add the class to one of the generated Elemens?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Mar 2016, 18:59

You need to style the header right? We can add headerClass-headerStyle attributes to p:tabPanel element to style the li of the tab header, would that work for you?

CC84
Posts: 69
Joined: 11 Mar 2016, 09:32

22 Mar 2016, 20:21

Yes, would do the job.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Mar 2016, 21:57

Ok, it is done for 0.9;

https://github.com/primefaces/primeng/issues/132

An example with headerStyleClass="ui-state-error"

Image

CC84
Posts: 69
Joined: 11 Mar 2016, 09:32

22 Mar 2016, 23:14

I'd like to have thx bottoms at the forum :)

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests