a
Size: a a a
a
a
a
AK
a
a
a
AK
AK
a
И
const first = {
rowsOrder: ['2', '1', '3'],
items: {
2: {
type: 'row',
id: '2',
},
1: {
type: 'row',
id: '1',
},
3: {
type: 'row',
id: '3',
columns: ['6', '7'],
},
6: {
type: 'column',
id: '6',
},
7: {
type: 'column',
id: '7',
},
},
};
const second = {
items: {
2: {
type: 'row',
id: '2',
order: 1,
parentId: 0,
},
1: {
type: 'row',
id: '1',
order: 3,
parentId: 0,
},
3: {
type: 'row',
id: '3',
order: 2,
parentId: 0,
},
6: {
type: 'column',
id: '6',
order: 1,
parentId: 3,
},
7: {
type: 'column',
id: '7',
order: 2,
parentId: 3,
},
},
};
И
И
const RowColumnCmp = ({ id }) => {
const column = useAtom(itemsState, (items) => items[id] || {}, [id]);
return (
<RowColumn>
<ColumnEmptyCmp />
</RowColumn>
);
};
И
AI
const first = {
rowsOrder: ['2', '1', '3'],
items: {
2: {
type: 'row',
id: '2',
},
1: {
type: 'row',
id: '1',
},
3: {
type: 'row',
id: '3',
columns: ['6', '7'],
},
6: {
type: 'column',
id: '6',
},
7: {
type: 'column',
id: '7',
},
},
};
const second = {
items: {
2: {
type: 'row',
id: '2',
order: 1,
parentId: 0,
},
1: {
type: 'row',
id: '1',
order: 3,
parentId: 0,
},
3: {
type: 'row',
id: '3',
order: 2,
parentId: 0,
},
6: {
type: 'column',
id: '6',
order: 1,
parentId: 3,
},
7: {
type: 'column',
id: '7',
order: 2,
parentId: 3,
},
},
};
RA
a
a
И
const column = useAtom(itemsState, (items) => items[id] || {}, [id]);