Giter VIP home page Giter VIP logo

fixed-data-select's Introduction

fixed data select

Interactive Select with typing auto-completion. It has following features:

  • Optimization of list display(Todo): For big data, it will only display limited number of items;
  • auto-completion when types: Recently, the filtered display data is processed locally; you could provide customization filter which will apply when you typeing. As default, it means the match the regexp
new RegExp(e.target.value).test(item)
  • uparrow, downarrow and Enter key stroke handle automatically.

usage

new FixedDataSelect({
  target,
  dataSource,
  itemHeight: 31,
  onPress: (record) => {
    // ...
  },
  onItemClick: (record) => {
    // ...
  },
});

API

FixedDataSelect

Just like its name, it aim to process a list display with fixed data;

  • dataSource(Array): Data source which are used to display on the list.
  • target(HTMLElement): The target node list will bind with.
  • onPress(function): The callback function which will be triggered on press Enter.
  • onItemClick(function): The callback function which will be triggered on click on the list item.
  • itemHeight(Number): It is required which indicate the height of list item. It could be used to calculate current active item's position.

fixed-data-select's People

Contributors

ryuever avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.