Skip to content

disable edit option of a particular column in validation phase #227

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

Open
SubhasmitaLMG opened this issue Nov 24, 2023 · 1 comment
Open
Labels
input control v5 Will be solved in v5

Comments

@SubhasmitaLMG
Copy link

SubhasmitaLMG commented Nov 24, 2023

@masiulis Is there any way to disable edit option of a particular column in validation phase?

I found something like readonly but not able to use it in a proper way.I want name field should not editable at validation phase.
example : const fields = [
{
label: "Name",
key: "name",
alternateMatches: ["first name", "first"],
fieldType: {
type: "input",
},
example: "Stephanie",
validations: [
{
rule: "required",
errorMessage: "Name is required",
},
],
},
{
label: "Surname",
key: "surname",
alternateMatches: ["second name", "last name", "last"],
fieldType: {
type: "input",
},
example: "McDonald",
validations: [
{
rule: "unique",
errorMessage: "Last name must be unique",
level: "info",
},
],
description: "Family / Last name",
},
{
label: "Age",
key: "age",
alternateMatches: ["years"],
fieldType: {
type: "input",
},
example: "23",
validations: [
{
rule: "regex",
value: "^\d+$",
errorMessage: "Age must be a number",
level: "warning",
},
],
},
{
label: "Team",
key: "team",
alternateMatches: ["department"],
fieldType: {
type: "select",
options: [
{ label: "Team One", value: "one" },
{ label: "Team Two", value: "two" },
],
},
example: "Team one",
validations: [
{
rule: "required",
errorMessage: "Team is required",
},
],
},
{
label: "Is manager",
key: "is_manager",
alternateMatches: ["manages"],
fieldType: {
type: "checkbox",
booleanMatches: {},
},
example: "true",
},
] as const

@masiulis
Copy link
Contributor

Hey @SubhasmitaLMG there is no way to disable editing of fields, PRs are welcome though!

@masiulis masiulis added the v5 Will be solved in v5 label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input control v5 Will be solved in v5
Projects
None yet
Development

No branches or pull requests

2 participants