Results 1 to 3 of 3

Thread: Ctrl click to select/deselect in dataview

  1. #1
    Sencha User
    Join Date
    Apr 2017
    Posts
    11
    Answers
    1

    Default Ctrl click to select/deselect in dataview

    Hello forum users.

    I have created a dataview with thumbnails. Selection mode is multi. The documentation for the selectable config says: 'Multi allows SHIFT+click and CTRL+click'.
    Selecting thumbnails by single click (to select a single thumbnail) or shift+click (to select all images from previous selection to the clicked thumbnail) works.

    Selecting additional thumbnails with ctrl+click or to toggle selection with ctrl+click does not work.

    Can anyone tell me if there is a workarund (or is the ctrl-key captured by something else)?

    A fiddle showing my attempts: https://fiddle.sencha.com/#view/editor&fiddle/2jni
    I'm using ExtJS 6.6, modern

    Mikael

  2. #2
    Sencha User
    Join Date
    Apr 2017
    Posts
    11
    Answers
    1

    Default

    I've made an ugly workaround, using a global event listener for document.onkeyup and document.onkeydown and keeping a global state for the desired keys (esc and ctrl).
    The solution is in a fiddle forked from the one above: https://fiddle.sencha.com/#view/editor&fiddle/2jt4

    I believe this is not very efficient so if you have a better solution, please tell me.
    This solution applies to my other thread https://www.sencha.com/forum/showthr...SC-in-dataview as well.

    Mikael

  3. #3
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    716
    Answers
    45

    Default

    See selectable config for the dataview - 'mutli' - https://docs.sencha.com/extjs/6.6.0/...cfg-selectable
    selectable is a configuration object for https://docs.sencha.com/extjs/6.6.0/...ion.Model.html

Similar Threads

  1. Dataview: "Ctrl" + select
    By joeywong in forum Ext JS 6.x Bugs
    Replies: 8
    Last Post: 29 Aug 2016, 7:13 AM
  2. Replies: 3
    Last Post: 14 Aug 2014, 11:36 AM
  3. Extending GridDragZone breaks ctrl+click select?
    By richardu in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 16 Jul 2010, 11:22 AM
  4. Replies: 8
    Last Post: 9 Apr 2009, 9:17 AM

Tags for this Thread

Posting Permissions

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