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
shivam-sharma7 opened this issue Aug 12, 2023 · 6 comments
Closed

[props] 'isReadOnly' is deprecated #619

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

Comments

@shivam-sharma7
Copy link
Member

we can use disabled as a alternative props

@jesperpedersen WDYT?

@shivam-sharma7 shivam-sharma7 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

@shivam-sharma7
Copy link
Member Author

@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}

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

shivam-sharma7 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

@shivam-sharma7
Copy link
Member Author

related #714

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