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

Add condition for rendering dropdown icon #117

Closed
wants to merge 1 commit into from

Conversation

lamba92
Copy link
Collaborator

@lamba92 lamba92 commented Sep 19, 2023

Added a conditional check to render the dropdown chevron icon only when the input field is enabled. This prevents the chevron from being displayed and potentially misleading the user when the dropdown is not selectable.

Added a conditional check to render the dropdown chevron icon only when the input field is enabled. This prevents the chevron from being displayed and potentially misleading the user when the dropdown is not selectable.
@lamba92 lamba92 requested a review from fscarponi September 19, 2023 15:20
Copy link
Collaborator

@fscarponi fscarponi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are going to remove the icon, you should put a box to hold his space.
a better solution would be to use Trasparent/Custom color for disable icon

@rock3r
Copy link
Collaborator

rock3r commented Sep 19, 2023

Disabled dropdowns still have the icon. It's disabled though.

image

This is how you do it.

colorFilter = if (!linkState.isEnabled) ColorFilter.disabled() else null,

Copy link
Collaborator

@rock3r rock3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my note

@fscarponi fscarponi marked this pull request as draft September 19, 2023 17:47
@fscarponi
Copy link
Collaborator

this pr is not more needed, because you can achieve the same result by overriding the theme with a color transparent for a disabled state. i'm going to close this!

@fscarponi fscarponi closed this Sep 19, 2023
@rock3r
Copy link
Collaborator

rock3r commented Sep 19, 2023

@fscarponi did you read my comment? Even the intention behind this change is wrong

@rock3r rock3r deleted the lamberto.basti/dropdown_enable_icon branch October 18, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants