add limit by
This commit is contained in:
22
pdb-js/src/app/limit-by/limit-by.component.html
Normal file
22
pdb-js/src/app/limit-by/limit-by.component.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<mat-form-field id="limitBy">
|
||||
<mat-label>Limit By:</mat-label>
|
||||
<mat-select [(value)]="limitBy">
|
||||
<mat-option value="NO_LIMIT">no limit</mat-option>
|
||||
<mat-option value="MOST_VALUES">most values</mat-option>
|
||||
<mat-option value="FEWEST_VALUES">fewest values</mat-option>
|
||||
<mat-option value="MAX_VALUE">max value</mat-option>
|
||||
<mat-option value="MIN_VALUE">min value</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field id="limit"
|
||||
*ngIf="limitBy !== 'NO_LIMIT'">
|
||||
<input
|
||||
matInput
|
||||
type="number"
|
||||
placeholder="Limit"
|
||||
min="1"
|
||||
value="{{limit}}"
|
||||
|
||||
>
|
||||
</mat-form-field>
|
||||
9
pdb-js/src/app/limit-by/limit-by.component.scss
Normal file
9
pdb-js/src/app/limit-by/limit-by.component.scss
Normal file
@@ -0,0 +1,9 @@
|
||||
#limitBy {
|
||||
width: 10em;
|
||||
margin-right: 1ex;
|
||||
}
|
||||
|
||||
#limit {
|
||||
width: 5em;
|
||||
margin-right: 0ex;
|
||||
}
|
||||
25
pdb-js/src/app/limit-by/limit-by.component.spec.ts
Normal file
25
pdb-js/src/app/limit-by/limit-by.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LimitByComponent } from './limit-by.component';
|
||||
|
||||
describe('LimitByComponent', () => {
|
||||
let component: LimitByComponent;
|
||||
let fixture: ComponentFixture<LimitByComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ LimitByComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LimitByComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
18
pdb-js/src/app/limit-by/limit-by.component.ts
Normal file
18
pdb-js/src/app/limit-by/limit-by.component.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Component, OnInit, Input} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'pdb-limit-by',
|
||||
templateUrl: './limit-by.component.html',
|
||||
styleUrls: ['./limit-by.component.scss']
|
||||
})
|
||||
export class LimitByComponent implements OnInit {
|
||||
|
||||
@Input() limit: number;
|
||||
|
||||
@Input() limitBy: string;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user