From bcaeeafa64af11d72ed426c12c1622ecef937ad9 Mon Sep 17 00:00:00 2001 From: abramovks Date: Wed, 25 Aug 2021 11:57:13 +0900 Subject: [PATCH] Update README.md Add information about key for sortable item for using Input in sort item --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 62f5fae..65d8160 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,13 @@ You can pass the following properties: - items: array of items to sort. Each item must be an object with a content property. You can optionally pass an array of classes that will be added to the item. For instance : ```jsx var list = [ - {content: (
test1
), classes:['bigger']}, - {content: (
test2
)}, - {content: (
test3
), classes:['bigger']}, - {content: (
test4
)} + {id: item-1, content: (
test1
), classes:['bigger']}, + {id: item-2, content: (
test2
)}, + {id: item-3, content: (
test3
), classes:['bigger']}, + {id: item-4, content: (
test4
)} ]; ``` +- id: uniq key (item-uniqID) ('item-' word is important) for correctly work with input, else you will lose focus on change text in field. - type: 'vertical', 'horizontal' or 'grid' - moveTransitionDuration (number): if a duration is provided, items will animate when they move on drag. The CSS animation's duration is the number provided. - dropBackTransitionDuration (number): if a duration is provided, the dragged item will go back to its original position when not dropped on a different target. The CSS animation's duration is the number provided.