| | |
| | | SubTable: subtable |
| | | } |
| | | |
| | | const Container = ({list, type, setting, placeholder, handleList, handleMenu, deleteMenu }) => { |
| | | const Container = ({list, type, groupId, placeholder, handleList, handleMenu, deleteMenu }) => { |
| | | let target = null |
| | | const [cards, setCards] = useState(list) |
| | | const moveCard = (id, atIndex) => { |
| | | const { card, index } = findCard(id) |
| | | |
| | | if (!card) return |
| | | |
| | | const _cards = update(cards, { $splice: [[index, 1], [atIndex, 0, card]] }) |
| | | setCards(_cards) |
| | | handleList(type, _cards) |
| | |
| | | newcard.icon = '' |
| | | newcard.type = item.subType |
| | | newcard.linkTab = Utils.getuuid() |
| | | newcard.subtabs = [] |
| | | newcard.supMenu = '' |
| | | newcard.groupId = groupId |
| | | |
| | | let targetId = cards.length > 0 ? cards[cards.length - 1].uuid : 0 |
| | | if (target) { |