Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-dropdown-list

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-dropdown-list

[![npm](https://img.shields.io/npm/v/ngx-dropdown-list.svg?style=flat-square)](https://www.npmjs.com/package/ngx-dropdown-list) [![npm downloads](https://img.shields.io/npm/dm/ngx-dropdown-list.svg)](https://www.npmjs.com/package/ngx-dropdown-list) [![Tra

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
173
decreased by-9.42%
Maintainers
1
Weekly downloads
 
Created
Source

ngx-dropdown-list

npm npm downloads Travis MIT licensed

An Angular 13 module for selecting data from drop-down list which supports multi-selection and filter.

Installation

npm install ngx-dropdown-list --save

DEMO

Check out the DEMO for more information!

Usage

Importing The 'ngx-dropdown-list' Module

import { DropdownListModule } from 'ngx-dropdown-list';

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    DropdownListModule,
    ...
  ],
  providers: [],
  bootstrap: [...]
})

export class AppModule { }

Enabling Dropdown List

<ngx-dropdown-list (selectionChange)="onChange($event)"
                   [items]="optionItems"
                   [multiSelection]="false"
                   [placeHolder]="'place holder of the drop-down list'"
                   [(selectedValue)]="maxRowsLimitation"
                   [suffixText]="' suffix text'"
                   [filterBox]="false"
                   [formatNumber]="true"
                   [disabled]="false">
</ngx-dropdown-list>

Parameters

NameDescriptionExample
(selectionChange)On change function called after the status of selection changed(selectionChange)="onChange($event)"
itemsSource data of the drop-down list[items]="optionItems"
multiSelectionProvides support for multiple selection[multiSelection]="true"
placeHolderPlace holder of the drop-down list[placeHolder]="'place holder of the drop-down list'"
selectedValueselected value of the drop-down list, supports 2-way binding[(selectedValue)]="maxRowsLimitation"
suffixTextsuffix text of the drop-down list[suffixText]="' suffix text'"
searchColumnthe column which will be searched by the search input[searchColumn]="'KPI'"
filterBoxEnable or disable the filter input[filterBox]="true"
formatNumberProvides support for formatting numbers[formatNumber]="true"
disabledEnable or disable the drop-down list[disabled]="false"

Input data samples:

/* input date without group info. */
optionItems = [
  {id: 'Max',     value: 'Max',     text: 'Maximum'},
  {id: 'Average', value: 'Average', text: 'Average'},
  {id: 'Sum',     value: 'Sum',     text: 'Total'},
  {id: 'Last',    value: 'Last',    text: 'Last'}
];

/* input date with group info. */
timezones = [
  {group: 'Africa', items: [
      {id: '1', value: 'Africa/Abidjan', text: 'Africa - Abidjan'},
      {id: '2', value: 'Africa/Accra', text: 'Africa - Accra'},
      {id: '3', value: 'Africa/Addis_Ababa', text: 'Africa - Addis Ababa'},
      {id: '4', value: 'Africa/Algiers', text: 'Africa - Algiers'},
      {id: '5', value: 'Africa/Asmara', text: 'Africa - Asmara'},
    ]},
  {group: 'America', items: [
      {id: '6', value: 'America/Adak', text: 'America - Adak'},
      {id: '7', value: 'America/Anchorage', text: 'America - Anchorage'},
      {id: '8', value: 'America/Anguilla', text: 'America - Anguilla'},
      {id: '9', value: 'America/Antigua', text: 'America - Antigua'},
      {id: '10', value: 'America/Araguaina', text: 'America - Araguaina'},
    ]}
  ]

Todo

  • Support Angular 13
  • ...

License

MIT

Keywords

FAQs

Package last updated on 07 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc