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

ixg-buttongroup templating

Open Eralmidia opened this issue 8 years ago • 6 comments

Description

I've been looking at the examples for the igx-buttongroup component. I have to say that I don't understand the reasoning behind how this component is structured. In the examples, it seems that the actual buttons are defined in the component. In my opinion it's a lot more clean to define all DOM elements in the template.

Result

Have to create an array of buttons in the component, with reduced control over the content

Expected result

Something in the lines of

<igx-buttongroup [multiSelection]="false">
<button igxButton><igx-icon>some_icon</igx-icon>Button 1 text</button>
<button igxButton><igx-icon>some_otheri_con</igx-icon>Button 2 text</button>
</igx-buttongroup>

Eralmidia avatar Feb 20 '18 09:02 Eralmidia

Currently the buttonGroup component does not have ng-content implemented and the only way to configure the buttons is through the app component initialization:

https://stackblitz.com/edit/angular-hk1vgm?file=app%2Fapp.component.ts

@SlavUI this is enhancement that we should definitely consider for implementation in the near future.

zdrawku avatar Feb 21 '18 08:02 zdrawku

@zdrawku Did we ever implement this?

kdinev avatar Jun 14 '18 10:06 kdinev

@kdinev no, we haven't. This enhancement was not included in any of the later sprints. We've spent our time working on other tasks mostly related to the igxGrid.

@SlavUI we can do this enhancement after the upcomming release, what do you think?

zdrawku avatar Jun 20 '18 08:06 zdrawku

@zdrawku if it is not critical we can do it the first week of July.

SlavUI avatar Jun 20 '18 10:06 SlavUI

@Eralmidia Do you want to test the PR before we merge it, to see if it's what you're looking for?

kdinev avatar Aug 09 '18 10:08 kdinev

@Eralmidia if there is something that you would want to add, just let us know. The PR is merged and the changes will be available in 6.2.0 as the Changelog states.

zdrawku avatar Aug 14 '18 07:08 zdrawku