We are using PickList component. We have a business requirement to "Do NOT show Add/Remove All buttons". Looks like show/hide of buttons option is not provided with @Input property at component level and there are no Ids or separate style classes for these buttons.
Can you please consider below options, so that this component will be more dynamic
1. Please provide an input attribute at component level, based on input property show/hide the buttons. This will be more dynamic and will be useful based on the requirement.
2. Or At least provide the Ids or different style classes to these buttons. We can use these Ids/style classes to show/hide these buttons.
Can anyone help on the solution for this requirement.
PrimeNG PickList - How to remove/hide Add remove All buttons
-
- Posts: 14
- Joined: 18 Jul 2016, 21:26
.ui-picklist button[icon="fa-angle-double-left"] {
display: none !important;
}
.ui-picklist button[icon="fa-angle-double-right"] {
display: none !important;
}
display: none !important;
}
.ui-picklist button[icon="fa-angle-double-right"] {
display: none !important;
}
-
- Posts: 1
- Joined: 19 Sep 2017, 23:17
I suggest the next:
in the template create a reference template like #picklistAction, then in the class set a instance the nativeElement, eg:
let picklist = this.picklistAction.el.nativeElement;
you can get ref of both them
let buttonrightAll = picklist.querySelector(".ui-picklist-buttons button[icon='fa-angle-double-right']") as HTMLElement;
let buttonleftAll = picklist.querySelector(".ui-picklist-buttons button[icon='fa-angle-double-left']") as HTMLElement;
you can do much, like
buttonleftAll.style.display = "none !important";
in the template create a reference template like #picklistAction, then in the class set a instance the nativeElement, eg:
let picklist = this.picklistAction.el.nativeElement;
you can get ref of both them
let buttonrightAll = picklist.querySelector(".ui-picklist-buttons button[icon='fa-angle-double-right']") as HTMLElement;
let buttonleftAll = picklist.querySelector(".ui-picklist-buttons button[icon='fa-angle-double-left']") as HTMLElement;
you can do much, like
buttonleftAll.style.display = "none !important";
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests