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

SelectButton: Two attributes for the same behaviour #15334

Closed
Thomas-Schindler opened this issue Apr 22, 2024 · 3 comments
Closed

SelectButton: Two attributes for the same behaviour #15334

Thomas-Schindler opened this issue Apr 22, 2024 · 3 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@Thomas-Schindler
Copy link

Describe the bug

The component has two attributes which are both switching the behaviour of the component regarding the clearing of the selection:

"unselectable", description: "Whether the selection can be cleared."
"allowEmpty", description: "Whether selection can not be cleared."

This is quite confusing, as it is not clear which one to use and more importantly, which one is winning in case of contradictionary values.
What happens if I set "unselectable" to "true" and "allowEmpty" to "false". Is it possible to clear the selected value or not?

image

Environment

We are currently using PrimeNG 16.9.1.

Reproducer

No response

Angular version

16.2.12

PrimeNG version

16.9.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.12.1

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

I think it would be easier to have only on attribute, either "unselectable" or "allowEmpty". I would prefer "allowEmpty"

@Thomas-Schindler Thomas-Schindler added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 22, 2024
@maruthumj
Copy link
Contributor

@Thomas-Schindler I will start work on this one

@maruthumj
Copy link
Contributor

@Thomas-Schindler I afraid that removing any one of the properties might cause issues for the people who are already using it.

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants