Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: treeviewdragdrop work fine as move and don't as copy

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-16474 in 5.1.4.
  1. #1
    Sencha User
    Join Date
    May 2014
    Location
    Russia
    Posts
    11

    Default treeviewdragdrop work fine as move and don't as copy

    Hello,

    I try to use treeviewdragdrop. According to this:

    http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.tree.plugin.TreeViewDragDrop-event-beforedrop

    TreeView must have config options allowCopy and copy property. But there are no such config and property in Ext.tree.View documentation. I try to include allowCopy: true in my viewConfig for copy nodes with Ctrl key pressed, but D&D not work as copy. Yes, plugin try to work, but this is not move and not copy. After 2-3 dragdrops with Ctrl my tree looks like wrong or broken tree. In fact this dragdrop actions destroy tree data.

    Where i am wrong? Can i use D&D to copy nodes in a tree?

    Thanks, and sorry for english.

    AirGraph

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Can you post your code so we can see what might be happening? Feel free to use our Fiddle app.
    https://fiddle.sencha.com/#home

  3. #3
    Sencha User
    Join Date
    May 2014
    Location
    Russia
    Posts
    11

    Default

    Thanks for answer, Gary!

    In my application are there only a couple strings of code for D&D, such as:

    viewConfig: {
    allowCopy: true,
    plugins: {
    ptype: 'treeviewdragdrop',
    pluginId: 'tree-view-dragdrop'
    }
    }

    Nothing special.
    I use also rowexpander in my TreePanel. Maybe here is a trouble?

    I'll try to make a short example and post it to fiddle, because a full code of my app is to big, as i think... :-)

    Thanks.

  4. #4
    Sencha User
    Join Date
    May 2014
    Location
    Russia
    Posts
    11

  5. #5
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    It should work with a config like this:
    Code:
        viewConfig: {
            plugins: {
                ptype: 'treeviewdragdrop',
            },
            copy: true
        },
    There seems to be a bug though, as the copy isn't working. I'll move this to the Bugs forum.

  6. #6
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  7. #7
    Sencha User
    Join Date
    May 2014
    Location
    Russia
    Posts
    11

    Default

    Thanks, Gary!

    I have edited fiddle according to recommended config.
    Copy option (Ctrl key pressed at the start of drag) still not work.

    By the way, a couple of questions:

    1. Why Ctrl key, but not Option/Alt key for copy option? Browser context menu, that appear by Ctrl+Click event is not a trouble for anyone?

    2. Why my vote rating is decreased to -1? Are my messages wrong or out of forum rules?

    Thanks.

  8. #8
    Sencha Premium Member
    Join Date
    Feb 2015
    Posts
    32

    Default

    Any news on this topic? We need this feature very soon.

  9. #9
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Hasn't been fixed yet. I added a note and bumped the priority a bit.

  10. #10
    Sencha Premium Member
    Join Date
    Feb 2015
    Posts
    32

    Default

    any news ? ext 5.1.1 does not fix this

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •