Skip to content

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

Open
@SubhasmitaLMG

Description

@SubhasmitaLMG

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions