Answer the question
In order to leave comments, you need to log in
How to disable the selection of values that are not included in the group?
there is an array of objects whose properties are arrays of objects:
const data = [
{
id: 1,
items: [
{
group: "a",
name: "name",
checked: false
},
{
group: "b",
name: "name",
checked: false
}
]
},
{
id: 2,
items: [
{
group: "c",
name: "name",
checked: false
},
{
group: "b",
name: "name",
checked: false
}
]
}
];
const groups = {
ab: ["a", "b"],
c: ["c"]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question