Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgxButton: The type property setter does not work correctly #5404

Closed
rmkrmk opened this issue Jul 12, 2019 · 0 comments

Comments

@rmkrmk
Copy link
Contributor

commented Jul 12, 2019

Description

The IgxButtonDirective type property setter does not set a new CSS class but it appends the new CSS class.

  • igniteui-angular version: 7.3.x
  • browser: All

Steps to reproduce

  1. Open dev demos

  2. Edit the "button.sample.html" file, by adding the following to the first button:
    "#firstButton (click)="buttonHandler($event)""

  3. Edit the "button.sample.ts" file, by adding the following after the last field definition:
    @ViewChild('firstButton', { read: IgxButtonDirective, static: true})
    public aButton: IgxButtonDirective;

public buttonHandler(e) {
this.aButton.type = 'outlined';
// type can be one of these 'flat', 'raised', 'outlined', 'fab', 'icon'
}

  1. Start dev demos and load the Button directive sample
  2. Press the first button in the sample.
  3. Inspect the same button in browser's dev tools

Result

After setting the type property to outlined the button's class is the following:
"igx-button--flat igx-button--outlined"
Also it does not looks like the other outlined buttons.

Expected result

The other buttons on the page with default type "outlined" have the following CSS class, which is the correct:
"igx-button--outlined"

rmkrmk added a commit that referenced this issue Jul 30, 2019

rmkrmk added a commit that referenced this issue Jul 31, 2019

rmkrmk added a commit that referenced this issue Aug 2, 2019

rmkrmk added a commit that referenced this issue Aug 2, 2019

rmkrmk added a commit that referenced this issue Aug 5, 2019

rmkrmk added a commit that referenced this issue Aug 5, 2019

rmkrmk added a commit that referenced this issue Aug 5, 2019

rmkrmk added a commit that referenced this issue Aug 5, 2019

rmkrmk added a commit that referenced this issue Aug 5, 2019

rmkrmk added a commit that referenced this issue Aug 5, 2019

rmkrmk added a commit that referenced this issue Aug 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.