Added form list moving to all lists. BOD-242

This commit is contained in:
Patrick Fic
2020-08-10 09:09:53 -07:00
parent 96d4f0372b
commit 3862f7f11f
6 changed files with 93 additions and 34 deletions

View File

@@ -214,7 +214,7 @@ export default function ShopInfoComponent({ form, saveLoading }) {
</Form.Item>
</LayoutFormRow>
<Form.List name={["md_messaging_presets"]}>
{(fields, { add, remove }) => {
{(fields, { add, remove, move }) => {
return (
<div>
{fields.map((field, index) => (
@@ -256,6 +256,11 @@ export default function ShopInfoComponent({ form, saveLoading }) {
remove(field.name);
}}
/>
<FormListMoveArrows
move={move}
index={index}
total={fields.length}
/>
</div>
</Form.Item>
))}
@@ -276,7 +281,7 @@ export default function ShopInfoComponent({ form, saveLoading }) {
</Form.List>
<Form.List name={["md_notes_presets"]}>
{(fields, { add, remove }) => {
{(fields, { add, remove, move }) => {
return (
<div>
{fields.map((field, index) => (
@@ -318,6 +323,11 @@ export default function ShopInfoComponent({ form, saveLoading }) {
remove(field.name);
}}
/>
<FormListMoveArrows
move={move}
index={index}
total={fields.length}
/>
</div>
</Form.Item>
))}