igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

`headerGroupClasses` is marked as hidden

Open ymita opened this issue 7 years ago • 9 comments

Description

headerGroupClasses is marked as hidden so that our doc does not show it.

  • igniteui-angular version: 7.2.0
  • browser: n/a

Steps to reproduce

  1. See the source code - https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/grids/column.component.ts#L347-L351

Result

headerGroupClasses is marked as hidden.

Expected result

headerGroupClasses is not marked as hidden.

Attachments

Attach a sample if available, and screenshots, if applicable.

ymita avatar Mar 12 '19 06:03 ymita

@ymita What's the reasoning of this request? I believe this property is hidden on purpose, not by mistake.

mpavlinov avatar Mar 12 '19 10:03 mpavlinov

@mpavlinov A customer would like to use this property for group header. Can we make this property available for customer developers?

ymita avatar Mar 12 '19 11:03 ymita

@ymita I see, but what is the use case he's trying to achieve? Is it a styling issue that we don't cover with our theming functionality? Maybe the solution for the customer is not opening up the private property. That's what I'm trying to understand.

mpavlinov avatar Mar 12 '19 12:03 mpavlinov

I believe the customer wants to align the text of group column header to center. Mihoko achieved this requirement by using headerGroupClasses input like so:

<igx-column-group ... headerGroupClasses="app-group-column-header">
....
</igx-column-group>
.app-group-column-header > div.igx-grid__thead-title {
      justify-content: center !important;
}

StackBlitz sample with ViewEncapsulation.None

StackBlitz sample without ViewEncapsulation.None

If we want to do it in "the right way", we may consider creating of a multi-header-text-align property that can help us to achieve this by using grid schema

@ymita, using of schemas is the official and declarative way to define all properties a component theme might use.

@simeonoff, could you share your expert opinion on that matter?

zdrawku avatar Mar 12 '19 13:03 zdrawku

@zdrawku If the target is to have custom headers, different from the default ones, I'd suggest using custom header templates.

simeonoff avatar Mar 13 '19 08:03 simeonoff

As we discussed with @SAndreeva, we are going to expose headerGroupClasses, the purpose of this input is to provide a class selector of the Grouped headers, such as headerClasses input which is used to get/set class selector of the Column header.

Related PR

zdrawku avatar Mar 15 '19 13:03 zdrawku

headerGroupClasses is now available from the API docs

zdrawku avatar Mar 15 '19 15:03 zdrawku

@zdrawku Thanks. Now I see headerGroupClasses is available on the 7.1.10 doc. Is this also available on the 7.2.1 doc as well?

ymita avatar Mar 22 '19 01:03 ymita

The PR was merged 4 days ago, which means it will be available in 7.2.2 version which we will release today.

zdrawku avatar Mar 22 '19 08:03 zdrawku