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

How to restrict Unselect event on ButtonGroup

Open Raju-N opened this issue 5 years ago • 1 comments

Description

Describe the issue. : We are using Infragistics angular component in our project. In that we have an Igx-grid where we have used 'Button group' component to select a value, we can set the new value on select but if we click again on the selected value it is getting unselected, i dont want to unselect the option. Kindly provide any option if available

  • igniteui-angular version: 8.2
  • browser: chrome

Steps to reproduce

  1. Step 1 : Create Igx grid with a column for 'Yes/No' using button group component
  2. Step 2: On unselect event make the button.selected = true
  3. ...

Result

What is the actual result after following the steps to reproduce? It is not making the option selected

Expected result

What is the expected result after following the steps to reproduce? The option need not want to unselect

Attachments

Attach a sample if available, and screenshots, if applicable.

Raju-N avatar Dec 22 '20 14:12 Raju-N

@Raju-N, Here is a small application modified to meet your requirements. Please take a look at it and feel free to use and modify it. Basically, it uses the select and unselect event of the buttonGroup, as well as the IgxButtonGroupComponent selectButton method.

astaev avatar Jan 20 '21 07:01 astaev