Skip to content

Commit

Permalink
Fixed #15404 - Component: PrimeNG Slider with range values not workin…
Browse files Browse the repository at this point in the history
…g properly
  • Loading branch information
mehmetcetin01140 committed Jun 7, 2024
1 parent d4d2d33 commit 4dc3036
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/app/showcase/doc/slider/basicdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Code } from '@domain/code';
<p>Two-way binding is defined using the standard <i>ngModel</i> directive.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-slider [(ngModel)]="value" />
<p-slider [(ngModel)]="value" styleClass="w-14rem" />
</div>
<app-code [code]="code" selector="slider-basic-demo"></app-code>
`
Expand All @@ -17,10 +17,10 @@ export class BasicDoc {
value!: number;

code: Code = {
basic: `<p-slider [(ngModel)]="value" />`,
basic: `<p-slider [(ngModel)]="value" styleClass="w-14rem"/>`,

html: `<div class="card flex justify-content-center">
<p-slider [(ngModel)]="value" />
<p-slider [(ngModel)]="value" styleClass="w-14rem"/>
</div>`,

typescript: `import { Component } from '@angular/core';
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/slider/rangedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Code } from '@domain/code';
<p>When <i>range</i> property is present, slider provides two handles to define two values. In range mode, value should be an array instead of a single value.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-slider [(ngModel)]="rangeValues" [range]="true" />
<p-slider [(ngModel)]="rangeValues" [range]="true" styleClass="w-14rem" />
</div>
<app-code [code]="code" selector="slider-range-demo"></app-code>
`
Expand All @@ -17,10 +17,10 @@ export class RangeDoc {
rangeValues: number[] = [20, 80];

code: Code = {
basic: `<p-slider [(ngModel)]="rangeValues" [range]="true" />`,
basic: `<p-slider [(ngModel)]="rangeValues" [range]="true" styleClass="w-14rem" />`,

html: `<div class="card flex justify-content-center">
<p-slider [(ngModel)]="rangeValues" [range]="true" />
<p-slider [(ngModel)]="rangeValues" [range]="true" styleClass="w-14rem" />
</div>`,

typescript: `import { Component } from '@angular/core';
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/slider/reactiveformsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Code } from '@domain/code';
</app-docsectiontext>
<div class="card flex justify-content-center">
<form [formGroup]="formGroup">
<p-slider formControlName="value" />
<p-slider formControlName="value" styleClass="w-14rem"/>
</form>
</div>
<app-code [code]="code" selector="slider-reactive-forms-demo"></app-code>
Expand All @@ -27,12 +27,12 @@ export class ReactiveFormsDoc implements OnInit {

code: Code = {
basic: `<form [formGroup]="formGroup">
<p-slider formControlName="value" />
<p-slider formControlName="value" styleClass="w-14rem" />
</form>`,

html: `<div class="card flex justify-content-center">
<form [formGroup]="formGroup">
<p-slider formControlName="value" />
<p-slider formControlName="value" styleClass="w-14rem" />
</form>
</div>`,

Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/slider/stepdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Code } from '@domain/code';
<p>Size of each movement is defined with the <i>step</i> property.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-slider [(ngModel)]="value" [step]="20" />
<p-slider [(ngModel)]="value" [step]="20" styleClass="w-14rem" />
</div>
<app-code [code]="code" selector="slider-step-demo"></app-code>
`
Expand All @@ -17,10 +17,10 @@ export class StepDoc {
value!: number;

code: Code = {
basic: `<p-slider [(ngModel)]="value" [step]="20" />`,
basic: `<p-slider [(ngModel)]="value" [step]="20" styleClass="w-14rem" />`,

html: `<div class="card flex justify-content-center">
<p-slider [(ngModel)]="value" [step]="20" />
<p-slider [(ngModel)]="value" [step]="20" styleClass="w-14rem" />
</div>`,

typescript: `import { Component } from '@angular/core';
Expand Down

0 comments on commit 4dc3036

Please sign in to comment.