Skip to content

Picker component does not have className #27

Closed
@zbranzov

Description

@zbranzov

Which platform(s) does your issue occur on?

Both

Please, provide the following version numbers that your issue occurs with:

  • CLI: 5.4
  • Cross-platform modules: 5.4
  • Runtime(s): 5.4
  • Plugin(s): 2.1

Please, tell us how to recreate the issue in as much detail as possible.

in the reactive forms example you cannot access className of the component:

<Label class="centered-label green-label" row="2" [text]="picker.className"></Label>

workaround:

<Label class="centered-label green-label" row="2" [text]="picker.nativeElement.className"></Label>

Is there any code involved?

<ActionBar title="Reactive Forms">
    <NavigationButton android.systemIcon="ic_menu_back" text="Back" (tap)="goBack()"></NavigationButton>
</ActionBar>
<GridLayout rows="100, *" columns="*, *" [formGroup]="movieForm" class="yellow-grid">
    <Label row="0" col="0" text="Pick a movie:" class="black-label label-center field-name-label"></Label>
    <PickerField #picker row="0" col="1" formControlName="movie" [(ngModel)]="pickerClassName1" hint="select a movie" padding="10" pickerTitle="Pick a movie" required
        class="picker" valueField="id" textField="name" [items]="pickerItems" (pickerOpened)="pickerOpened($event)" (pickerClosed)="pickerClosed($event)">
        <ng-template let-item="item">
            <GridLayout rows="auto, *" columns="*, auto">
                <Label [text]="item.name" colSpan="2" class="black-label item-template-top-label"></Label>
                <Label [text]="item.year" col="0" row="1" class="item-template-label" marginBottom="20"></Label>
                <Image [src]="item.imageUrl" col="1" row="0" rowSpan="2" class="item-template-picture"></Image>
            </GridLayout>
        </ng-template>
    </PickerField>

    <GridLayout row="1" col="0" colSpan="2" rows="auto, auto, auto" backgroundColor="white">
        <Button class="submit-button" text="Submit form" (tap)="onSubmit()"></Button>
        <Label class="centered-label" row="1" text="Picker css classes:"></Label>
        <Label class="centered-label green-label" row="2" [text]="picker.className"></Label>
    </GridLayout>
</GridLayout>>

Metadata

Metadata

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