Added form list moving to all lists. BOD-242
This commit is contained in:
@@ -3,6 +3,7 @@ import { Button, Col, Form, Input, InputNumber, Row } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
//TODO Fix up styles.
|
||||
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
||||
export default function ShopInfoSchedulingComponent({ form }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -12,7 +13,7 @@ export default function ShopInfoSchedulingComponent({ form }) {
|
||||
<Row>
|
||||
<Col span={24}>
|
||||
<Form.List name={["ssbuckets"]}>
|
||||
{(fields, { add, remove }) => {
|
||||
{(fields, { add, remove, move }) => {
|
||||
return (
|
||||
<div>
|
||||
{fields.map((field, index) => (
|
||||
@@ -88,6 +89,11 @@ export default function ShopInfoSchedulingComponent({ form }) {
|
||||
remove(field.name);
|
||||
}}
|
||||
/>
|
||||
<FormListMoveArrows
|
||||
move={move}
|
||||
index={index}
|
||||
total={fields.length}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user