const [stateCheckboxFields, setStateCheckboxFields] = useState<CusCheckbox[][]>(
strTableData.map((item) => {
if (item.type === ColumnType.checkBox) {
return item.fieldsCheckbox;
}
return [{ checked: false, title: '', id: '' }];
})
);
const data = [
{
title: 'some text1',
id: '01',
type: 'search',
fieldsSearch: [
{
value: 'this value',
id: '001'
}
]
},
{
title: 'some text2',
id: '02',
type: 'checkbox',
fieldsCheckbox: [
{
checked: true,
id: '002',
title: 'another text'
}
]
}
]fieldsCheckbox: [
{
checked: true,
id: '002',
title: 'another text'
}
]
strTableData
.filter(item => item.type === ColumnType.checkBox)
.map(item => item.fieldsCheckbox) EvgenJunior,