I have this code :
const column = Array.from({ length: 16 }, (_, i) => ({
title: `${i + 8}-${i + 9}`,
dataIndex: `${i + 8}`,
}));
column.splice(0, 0, { title: 'day/time', dataIndex: 'day' });
const data = Array.from({ length: 7 }, (_, i) => ({
day: `${i + 1} of week`,
8: <Checkbox />,
9: <Checkbox />,
10: <Checkbox />,
11: <Checkbox />,
12: <Checkbox />,
13: <Checkbox />,
14: <Checkbox />,
15: <Checkbox />,
16: <Checkbox />,
17: <Checkbox />,
18: <Checkbox />,
19: <Checkbox />,
20: <Checkbox />,
21: <Checkbox />,
22: <Checkbox />,
23: <Checkbox />,
}));
and output is :
I think I can summarize the code of data and do not type all of the "checkbox" , while I'm using methods of ES6 .
any solutions?
