
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
ng-scroll-picker
Advanced tools
Base logic inspired from https://github.com/hiyali/ng-data-picker
NgScrollPicker is an Angular package inspired by ng-data-picker that provides a scroll picker component for selecting various options. You can find a live demo of the NgScrollPicker here.
npm install ng-scroll-picker
import { NgModule } from "@angular/core";
import { NgScrollPickerModule } from "ng-scroll-picker";
@NgModule({
declarations: [
/* ... */
],
imports: [
/* ... */
NgScrollPickerModule,
],
/* ... */
})
export class AppModule {}
<ng-scroll-picker [data]="data" (change)="change($event)"></ng-scroll-picker>
import { Component, OnInit } from '@angular/core';
import {
PickerDataModel,
PickerValueModel,
PickerResponseModel,
} from 'ng-scroll-picker';
@Component({
selector: 'app-basic',
templateUrl: './basic.component.html',
styleUrls: ['./basic.component.scss'],
})
export class BasicComponent implements OnInit {
selectedValue: any;
data: PickerDataModel[] = [
{
textAlign: 'start',
weight: 9,
className: undefined,
onClick: (gIndex: any, iIndex: any, selectedValue: any) => {
console.log('selectedValue', selectedValue);
},
currentIndex: 0,
list: [],
divider: false,
text: 'test',
groupName: 'test',
},
];
ngOnInit() {
const malaysianBanks: PickerValueModel[] = [
{ label: 'Maybank', value: 'MBB' },
{ label: 'CIMB Bank', value: 'CIMB' },
{ label: 'Public Bank', value: 'PBB' },
{ label: 'RHB Bank', value: 'RHB' },
{ label: 'Hong Leong Bank', value: 'HLB' },
{ label: 'AmBank', value: 'AMB' },
{ label: 'Bank Islam Malaysia', value: 'BIMB' },
{ label: 'OCBC Bank', value: 'OCBC' },
{ label: 'HSBC Bank Malaysia', value: 'HSBC' },
{ label: 'Standard Chartered Bank Malaysia', value: 'SCB' },
];
this.data[0].list = malaysianBanks;
this.selectedValue = this.data[0].list[0].value;
}
change(res: PickerResponseModel) {
this.selectedValue = this.data[res.gIndex].list[res.iIndex].value;
}
}
We welcome contributions from the community. Feel free to submit issues, feature requests, and pull requests on our GitHub repository.
FAQs
Base logic inspired from https://github.com/hiyali/ng-data-picker
The npm package ng-scroll-picker receives a total of 38 weekly downloads. As such, ng-scroll-picker popularity was classified as not popular.
We found that ng-scroll-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.