Skip to content

mat-select should support Infinity as a value #10860

@knightcode

Description

@knightcode
    <mat-form-field>
        <mat-select placeholder="Log out after.." [(ngModel)]="maxsession">
          <mat-option [value]="3600">1 hour</mat-option>
          <mat-option [value]="7862400">3 months</mat-option>
          <mat-option [value]="15724800">6 months</mat-option>
          <mat-option [value]="31557600">1 year</mat-option>
          <mat-option [value]="Infinity">Never</mat-option>
        </mat-select>
      </mat-form-field>

The UI does not show the last option as being selected, but Infinity === Infinity is true, Infinity === 5 is false, etc.

typescript: 2.8.1
angular: 5.2.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions