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

igxToolbar should have the option to add custom template

Open jdk339 opened this issue 8 years ago • 5 comments

Feature Request

It would awesome if the Grid (igx-grid) could have additional toolbar features, such as clearing the current filters, clearing sorting, and toggling the summary. Currently, it's no trouble to include such functionality elsewhere, but it would make sense to be in the Grid toolbar along with the other features.

Here is how I currently do it outside the grid:

<div>
  <button igxButton="flat" igxRipple igxRippleCentered="true" (click)="grid.clearFilter()">
    <igx-icon fontSet="material" name="clear"></igx-icon>
    CLEAR FILTERS
  </button>
  <button class="marg-l-10" igxButton="flat" igxRipple igxRippleCentered="true" (click)="grid.clearSort()">
    <igx-icon fontSet="material" name="clear"></igx-icon>
    CLEAR SORTING
  </button>
  <igx-switch class="marg-l-10" [checked]="summariesEnabled" (change)="toggleSummaries($event)">
    TOGGLE SUMMARY
  </igx-switch>
</div>

igx grid toolbar idea

jdk339 avatar Nov 09 '18 19:11 jdk339

Thank you for the recommendation @jdk339!

zdrawku avatar Nov 12 '18 07:11 zdrawku

@kdinev and @StefanIvanov Guys what do you think ? I think this is a really good idea :)

SlavUI avatar Nov 13 '18 08:11 SlavUI

The issue is similar to #2887 The toolbar should expose the empty outlet for templating by the user. There will be different use-cases for actions developers want to put in the toolbar, so instead of trying to exhaust them all with configuration, we should just expose a template.

@SlavUI Can we prioritize this for the next sprint?

kdinev avatar Nov 13 '18 08:11 kdinev

I agree 100% with @kdinev and that would allow @jdk339 to use the snippet and create such a template but spare his time regarding styling as the toolbar will define that for him.

StefanIvanov avatar Nov 13 '18 09:11 StefanIvanov

@jdk339 This update will appear with the next tag - 7.1.0, as well as in patches 6.2.4 and 7.0.3

kdinev avatar Dec 06 '18 16:12 kdinev