Giter VIP home page Giter VIP logo

ngx-select's Introduction

ngx-select

Select module for angular 2-4

DEMO

Usage in an existing angular cli project

  1. Install via npm
npm install @halaz.lazlo/ngx-select --save
  1. Import module
// src/app/app.module.ts

import { NgxSelectModule } from '@halaz.lazlo/ngx-select';
imports: [..., NgxSelectModule, ...]
  1. Use
<lib-ngx-select [options]="..." [(model)]="..."></lib-ngx-select>

Available settings

Attribute Type Default Description
[(model)] any undefined the ngModel
[options] object[] undefined The options shown in dropdown
[valueField] string value The value field of option
[labelField] string label The label field of option
[isMultiple] boolean false Multiselect
[allowAdd] boolean false Allows adding new option
[isObjectValue] boolean false Sets the model the whole option object
[maxItems] number undefined If multiple, how many items can be added to array
[isLoading] boolean false Is waiting for async call, a spinner is visible
[placeholder] string undefined The placeholder
[dropdownDirection] ['up', 'down'] down Which direction the dropdown opens
[noOptionAvailableMsg] string No options available, try searching... When options is empty or not defined
[noFilterResultsMsg] string No results The message shown when no filtered result is found
[allOptionSelectedMsg] string All options have been selected All options have been selected
[addOptionMsg] string Add {{input}}... The message when isMultiple === true, the {{input}} is replaced with the value in the input
[mobileBreakpoint] number 768 isMobile = screen.width < mobileBreakpoint

Available events

Event Returns Description
(modelChange) object The changed model
(inputChange) string When the filter input text changes
(dropdownOpen) null Dropdown open
(dropdownClose) null Dropdown close

ngx-select's People

Contributors

halaz-lazlo avatar

Watchers

 avatar

ngx-select's Issues

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.