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

Button icon is not dynamic #1408

Closed
mischkl opened this issue Nov 23, 2016 · 0 comments
Closed

Button icon is not dynamic #1408

mischkl opened this issue Nov 23, 2016 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mischkl
Copy link
Contributor

mischkl commented Nov 23, 2016

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
If a button's icon is bound to a field in the parent component and that field changes, it does not react to the change.

Expected behavior
If the field changes the icon should also change.

Minimal reproduction of the problem with instructions

@Component({
  selector: 'my-component',
  template: '<button pButton [icon]="myIcon" (click)="onClick()"></button>'
})
export class MyComponent {
  myIcon: string = 'fa-bell';

  onClick() {
    this.myIcon = 'fa-bell-o';
  }
}

Icon should change, but doesn't.

What is the motivation / use case for changing the behavior?
In my case it is a toggle button that should change the icon based on the state of the toggle.

Please tell us about your environment:
Windows 7, Node 6.9.1

  • Angular version: 2.1.0

  • PrimeNG version: 1.0.0

  • Browser: all

  • Language: TypeScript

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Dec 20, 2016
@cagataycivici cagataycivici self-assigned this Dec 20, 2016
@cagataycivici cagataycivici added this to the 1.1.1 milestone Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants