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

[props] 'isReadOnly' is deprecated #619

Closed
shivarm opened this issue Aug 12, 2023 · 6 comments
Closed

[props] 'isReadOnly' is deprecated #619

shivarm opened this issue Aug 12, 2023 · 6 comments
Assignees
Labels
type/bug Something isn't working

Comments

@shivarm
Copy link
Member

shivarm commented Aug 12, 2023

we can use disabled as a alternative props

@jesperpedersen WDYT?

@shivarm shivarm added the type/bug Something isn't working label Aug 12, 2023
@jesperpedersen
Copy link
Collaborator

We should align on enabled - and in this case have it be false

@shivarm
Copy link
Member Author

shivarm commented Aug 15, 2023

@jesperpedersen I don't understand here false look 👇

We have

   <TextInput
                    value={schema.name}
                    isRequired
                    type="text"
                    id="schemaName"
                    aria-describedby="name-helper"
                    name="schemaName"
                    validated={(schema.name && schema.name !== "") || !isTester ? "default" : "error"}
                    isReadOnly={!isTester}
                    onChange={value => {
                        onChange({ name: value })
                    }}
                />

You mean? see comment area

   <TextInput
                    value={schema.name}
                    isRequired
                    type="text"
                    id="schemaName"
                    aria-describedby="name-helper"
                    name="schemaName"
                    validated={(schema.name && schema.name !== "") || !isTester ? "default" : "error"}
                    enabled={false} // Set 'enabled' to 'false' to disable the input
                    onChange={value => {
                        onChange({ name: value })
                    }}
                />

@jesperpedersen
Copy link
Collaborator

Yeah, so enabled={isTester}

@shivarm shivarm self-assigned this Aug 16, 2023
@shivarm
Copy link
Member Author

shivarm commented Aug 17, 2023

Yeah, so enabled={isTester}

@jesperpedersen but this is not supporting in our project

@jesperpedersen
Copy link
Collaborator

It just have to be uniform across the entire code-base

@shivarm
Copy link
Member Author

shivarm commented Oct 6, 2023

related #714

@shivarm shivarm closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants