Coder Social home page Coder Social logo

flex-auto-complete's Introduction

An auto complete input for Flex 4 (Spark), based on the component found here: http://flashcommander.org/blog/flex-4-autocomplete. I cleaned up the code, removed some options that I didn't need and added others. The main difference is that you can now provide an item renderer for the auto complete suggestions.

Some features:

  • Possibility to provide custom filter function (AutoComplete.filterFunction), can access (AutoComplete.text) to get the entered text
  • Possibility to provide custom sort object (AutoComplete.sort)
  • Possibility to provide custom item renderer for the suggestions in the drop-down (AutoComplete.itemRenderer)
  • Possibility to provide a label field / function (AutoComplete.labelField, AutoComplete.labelFunction). Used for the display of suggestions if no item renderer is specified, and to complete the text based on the selected suggestion
  • Option to clear the text when an item is selected (AutoComplete.clearTextAfterSelection)

Differences to the original component:

  • Only opens the drop down when the user starts typing, no option to open on focus
  • Escape clears the text and closes drop-down
  • Avoids the workaround of using a customized list for dispatching keyboard events to the drop-down
  • Default filter function always uses contains on item label, no option to use starts-with

flex-auto-complete's People

Contributors

sissbruecker avatar

Watchers

 avatar  avatar

Forkers

cioclea

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.