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

[FIX] #14600 Add Disabled state for icon button #14602

Merged
merged 4 commits into from
Mar 29, 2024

Conversation

pouyababaie
Copy link
Contributor

@pouyababaie pouyababaie commented Jan 22, 2024

Fixes #14600

i added this feature , I'm guessing a lot of people felt the need of this.

image

Copy link

vercel bot commented Jan 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Mar 24, 2024 8:07am

@pouyababaie pouyababaie changed the title [FIX] #14600 [FIX] #14600 Add Disabled state for icon button Jan 22, 2024
@cdskill
Copy link

cdskill commented Feb 28, 2024

+1 should be merged this feat is asked since 2019

@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Mar 22, 2024

Hi,

Instead of changing functionality of current disabled attribute, could you please add two new inputs so users can disable it totally or disable them by their choice. It should be like this:

1-) All disabled, if user sets disabled as true, component will be disabled completely (this is for backward compatibility).

<p-splitButton [disabled]="true"></p-splitButton>

2-) Add new buttonDisabled and menuButtonDisabled input properties.

// that one should only disable the button of the component.
<p-splitButton [buttonDisabled]="true"></p-splitButton>

// that one should only disable the menu button of the component.
<p-splitButton [menuButtonDisabled]="true"></p-splitButton>

3-) If they are all used together, the disabled property should supersede menuButtonDisabled and buttonDisabled properties.

I'll merge after these changes. In this way, we keep the functionality of disabled and introduce two new input props if anyone needs to use.

Please tag me after the changes so I don't miss the PR.

@cetincakiroglu cetincakiroglu added Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. Status: Pending Review Issue or pull request is being reviewed by Core Team labels Mar 22, 2024
@pouyababaie
Copy link
Contributor Author

@cetincakiroglu

I added the requested state for disabled button but i'm not sure i did it the right way. i would be very happy to see your comments on this commit. if there is a better way to solve this issue , i'd like to hear it.

image

@cetincakiroglu cetincakiroglu removed Status: Pending Review Issue or pull request is being reviewed by Core Team Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. labels Mar 29, 2024
@cetincakiroglu cetincakiroglu merged commit ae87ee4 into primefaces:master Mar 29, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants