ls

lanata-select

Angular2 based replacement for select boxes

Showing:

Popularity

Downloads/wk

0

Maintenance

No Maintenance Data Available

Package

Dependencies

5

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Install

package.json

"dependencies": {
  "lanata-select": "<version>"
}

module

import { LanataSelectModule  } from 'lanata-select';
@NgModule({
  imports: [
    ...,
    LanataSelectModule
  ],
  ...
});

Usage

component

import { Component } from '@angular/core';
import { Item } from 'lanata-select';

@Component({
  selector: 'my-app',
  template: `
    <h1>Test</h1>
    <lanata-select
      [type]="'simple'"
      [items]='simpleCollect'
      [placeholder]="'Testtext'"
      (selected)='simpleSelected($event)'>
    </lanata-select>
    <lanata-select
      [type]="'group'"
      [items]='groupCollect'
      [placeholder]="'Testtext'"
      (selected)='groupSelected($event)'>
    </lanata-select>
  `
})
export class AppComponent {
  private simpleCollect: Array<any> = [
    { text: 'alma' },
    { text: 'bamba' },
    { text: 'Cecília' }
  ]
  public simpleSelected(item: Item) {
    console.log(item.text);
  }

  private groupCollect: Array<any> = [
    {
      text: 'alma',
      childs: [
        { text: 'a' },
        { text: 'b' }
      ]
    },
    {
      text: 'alma',
      childs: [
        { text: 'a' },
        { text: 'b' }
      ]
    }
  ]
  public groupSelected(item: Item) {
    console.log(item.text);
  }
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial