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

[Inputs] Styles should prioritize disabled over readOnly #8239

Open
nickofthyme opened this issue Dec 13, 2024 · 2 comments
Open

[Inputs] Styles should prioritize disabled over readOnly #8239

nickofthyme opened this issue Dec 13, 2024 · 2 comments
Labels
design decision feature request help wanted The EUI team is looking for community members to pick up and implement this issue

Comments

@nickofthyme
Copy link
Contributor

nickofthyme commented Dec 13, 2024

Is your feature request related to a problem? Please describe.

Related to #8238, a solution to this would be to set readOnly whenever disabled is set, so something like this...

const MyCustomInput = ({ disabled, readOnly }) => (
  <input
    type="text"
    disabled={disabled}
    readOnly={readOnly ?? disabled}
  >
)

The issue in this case is that the current styles prioritize readOnly whenever both readOnly and disabled are applied together.

Image

See demo https://codesandbox.io/p/sandbox/adoring-christian-jk8t45

Describe the solution you'd like

The input styles prioritize disabled over readOnly. This is the same behavior as the basic html input.

Describe alternatives you've considered

An alternate fix to #8238 would be to just check disabled before triggering onChange from a consumers perspective, but this is not ideal.

Desired timeline
Unknown

cc: @MichaelMarcialis

@JasonStoltz JasonStoltz added the help wanted The EUI team is looking for community members to pick up and implement this issue label Dec 17, 2024
Copy link

👋 Thank you for your suggestion or request! While the EUI team agrees that it's valid, it's unlikely that we will prioritize this issue on our roadmap. We'll leave the issue open if you or anyone else in the community wants to implement it by contributing to EUI. If not, this issue will auto close in one year.

@JasonStoltz
Copy link
Member

We estimated this as a Large size effort because of the potential impact on Kibana and the potential to break a large number of FTR tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design decision feature request help wanted The EUI team is looking for community members to pick up and implement this issue
Projects
None yet
Development

No branches or pull requests

2 participants