king
2020-01-14 7ea1c5f53702951fc4df60e969fc67ef5d7af4dd
src/templates/modalconfig/dragelement/index.jsx
@@ -90,12 +90,8 @@
      const { index: overIndex } = findCard(`${targetId}`)
      let targetIndex = overIndex
      // if (!target) {
      targetIndex++
      // }
      // if (targetIndex < 0) {
      //   targetIndex = 0
      // }
      const _cards = update(cards, { $splice: [[targetIndex, 0, newcard]] })
      setCards(_cards)
@@ -115,9 +111,10 @@
  return (
    <div ref={drop} className="ant-row modal-fields-row">
      {cards.map(card => (
        <Col key={card.uuid} span={card.type !== 'textarea' ? _cols : 24}>
        <Col key={card.uuid} className={card.type === 'textarea' ? 'textarea' + setting.cols : ''} span={card.type !== 'textarea' ? _cols : 24}>
          <Card
            id={`${card.uuid}`}
            id={card.uuid}
            cols={setting.cols}
            card={card}
            moveCard={moveCard}
            editCard={editCard}