YGYOOO / react-draggable-tags

A draggable component for React. 一个基于React的可拖拽组件。

Home Page:https://ygyooo.github.io/react-draggable-tags

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] Column of tags doesn't detect drag event

manuartero opened this issue · comments

A video worth thousand words:

I've created a demo for showing this issue:

column-bug.mov

There is a wrapper div (the column):

      display: 'flex',
      flexWrap: 'wrap',
      width: '100px',

And craeting the tags as mentioned on the docs:

     <DraggableArea
        tags={items}
        render={({ tag: item, index }) => (
          <div id={`xxx`} className='ccc'>
            {render(item, index)}
          </div>
        )}
        onChange={onChange}
      ></DraggableArea>

As you can see on the video, the draggable area doesn't detect the event till the x axis change

commented

Hi, if you want to use it as a list, you could add a "isList" attribute to DraggableArea. Here is the demo: https://ygyooo.github.io/react-draggable-tags/#List

Ok great!

works like a charm ->

solved.mov