Datatable file drop

I want to drop only pictures from explorer into datatable.

But I guess there is a bug when there is no data in datatable.


http://webix.com/snippet/2eb36492

Possibly the problem was solved by the new version. I did not manage to get the result like in your picture. Please check with the new version.

It’s still same in snippet. I can’t drop anything. Cursor keeps change and when i drop it’s just trying to open it in browser.

And also “drop files” text is showing up and then be lost repeatedly in the same time.

addDropZone sets “drop” event handler for datatable. Possibly you are using some other scripts that block this handler.

Locally the same snippet uploads files (tested in all modern browsers).

However, your onFileUpload calls getItem method for a datatable row. If there are not rows in datatable, you will get error. You need to call add() method to add a row if it’s needed.

I want to insert a row when I drop an image. So when there is no image, there wouldn’t be any row.

As I say it’s worked fine when there is a row.

You can see the bug in the video.

Datatable has “autoheight” property. That is why the view height is equal to the height of DataTable header. When you drop a file to the empty space of the page, you drop it to document.body, not the datatable.

Please remove autoheight and see the difference:

http://webix.com/snippet/436470d6

You’re right. It works like a charm. Thank you.

You are welcome! Thank you for posting video. It helped.