1.2.2-beta • Published 6 years ago

fixed-data-select v1.2.2-beta

Weekly downloads
32
License
MIT
Repository
github
Last release
6 years ago

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) => {
    this.revertDataSourceFromKey(record);
  },
  onItemClick: (record) => {
    this.revertDataSourceFromKey(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.
1.2.2-beta

6 years ago

1.2.1-beta

6 years ago

1.2.0-beta

6 years ago

1.1.26

6 years ago

1.1.25

6 years ago

1.1.24

6 years ago

1.1.23

6 years ago

1.1.22

6 years ago

1.1.21

6 years ago

1.1.20

6 years ago

1.1.19

6 years ago

1.1.18

6 years ago

1.1.17

6 years ago

1.1.16

6 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago