anovi / selectonic Goto Github PK
View Code? Open in Web Editor NEWjQuery based plugin for making any list of items selectable by mouse and keyboard.
Home Page: http://anovi.github.io/selectonic/
License: MIT License
jQuery based plugin for making any list of items selectable by mouse and keyboard.
Home Page: http://anovi.github.io/selectonic/
License: MIT License
Moving cursor by up
, down
, left
, right
within table.
I use text input to filter data in selectonic. I call 'refresh', 'unselect' and 'select' after each change in input to select first item in list:
$element = $(element);
$element.selectonic('refresh');
$element.selectonic('unselect');
var filter = $element.selectonic("option", "filter"); // '.list_item'
setTimeout(function () { $element.selectonic('select', filter + ":first"); }, 10);
Last line threw 'Uncaught TypeError: Cannot read property 'addClass' of null' if no item in list becouse '_checkIfSelector' and '_checkIfElem' return null.
P.S. Maybe it usefull to add 'selectFirst' option when calling 'refresh'?
Moving focus by arrows and select/unselect items by space
.
Is it possible to configure Shift Key Selection behavior?
For example, currently if there are total 6 items, and I click on item #3 (without crtl or Shift key).
Later I press shift and click on item #5. Items 3 to 5 are selected - fair enough.
Now I press shift and click on item #1. Items 1 to 5 are selected. It should have selected items 1 to 3 (and deselect #4 and #5). This is the normal shift key selection behavior in Windows Explorer. I'm looking for similar behavior.
When list's container is scrollable, targeted element should depend from container's height, else from window's height.
Hi,
I'm currently using your amazing plugin for a personnal project. Thanks a lot !
I am willing to apply some filters to my list. I achieved to hide the elements from the list, which is correct to prevent the user to select those items with the mouse, but I can't figure out a way to prevent the user to select them with the mouse.
Do you have any idea on how I could disable only few items ?
Thanks a lot,
Regards,
Thomas
Hi Alexey,
Amazing plugin you have here!
I'm trying to use Selectonic together with NestedSortable and I'm encountering some difficulties.
I've made a jsfiddle to better illustrate my problem.
If you try to randomly select elements, you'll see that some elements become selected / deselected without any click over them. And the shift hold selection will not select child elements because they're not in the same scope as the target element.
Is there a possibility that the plugin could support this feature in a near future?
Thank you
Last item can be selected with loop=false and preventInputs=false when up arrow key pressed and no item in focus.
What if i want to create a group of items with checkboxes and turn those checkboxes to handles? I want select/unselect by clicking on checkboxes and select a range by shift-click.
Hey guy, in my code this with the following error I can not fix, follows the error:
"uncaught Error: Element [object HTMLDivElement] has no plugin selectonic
throw new Error( 'Element ' + this[0] + ' has no plugin ' + Plugin.pluginName ); "
Is there an NPM package for the plugin? If not are you able to create it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.