Telerik Forums
Kendo UI for Angular Forum
0 answers
49 views

Hi. i have some questions about focus on clear button

If click on kendo-textbox and input value, clear button will appear on the left side of the field. if you press the tab button, the focus will shift to this clear button.

<kendo-textbox
  [style.width.px]="200"
  [clearButton]="true"
></kendo-textbox>

 

If select value in kendo-combobox, clear button will appear on the left side of the field, before button show\hide list. But if press tab button, focus will shift to next DOM element

<kendo-combobox
  [data]="listItems"
>

Please, tell me why there is such a different behavior when pressing tab. Why doesn't the focus shift to the clear button in kendo-combobox.

Thanks.

Andrii
Top achievements
Rank 1
 asked on 15 Feb 2024
0 answers
2.3K+ views

Hi!

I searched the forum but found no answer. I have several controls in the form, each one inserted according to the scheme:

      <div fxFlex="30">
        <kendo-formfield [orientation]="'horizontal'">
          <kendo-label text="Rodzaj przewozów">
            <kendo-dropdownlist #transportTypeDropdown class="transport-type" [data]="transportTypes"
              [textField]="'name'" [valueField]="'id'" [formControlName]="formNames.transportType"
              [(value)]="formModel.transportType" [disabled]="areControlsDisabled">
            </kendo-dropdownlist>
          </kendo-label>
          <app-form-error [controlName]="formNames.transportType" [form]="form"></app-form-error>
        </kendo-formfield>
      </div>
      <div fxFlex="10">
        <kendo-formfield [orientation]="'horizontal'">
          <kendo-label text="wyszukaj bez trasy">
            <input type="checkbox" #searchWithoutRouteCheckbox class="search-without-route-type"
              [formControlName]="formNames.searchWithoutRoute" [value]="formModel.searchWithoutRoute" kendoCheckBox
              [disabled]="areControlsDisabled" />
          </kendo-label>
          <app-form-error [controlName]="formNames.searchWithoutRoute" [form]="form"></app-form-error>
        </kendo-formfield>
      </div>
      <div fxFlex="10">
        <kendo-formfield [orientation]="'horizontal'">
          <kendo-label text="Przes. kal. 2">
            <kendo-dropdownlist #calendarShiftDropdown class="calendar-shift" [data]="calendarShiftItems"
              [textField]="'text'" [valueField]="'value'" [formControlName]="formNames.calendarShift"
              [valuePrimitive]="true" [(value)]="formModel.calendarShift" [disabled]="areControlsDisabled">
            </kendo-dropdownlist>
          </kendo-label>
          <app-form-error [controlName]="formNames.calendarShift" [form]="form"></app-form-error>
        </kendo-formfield>
      </div>

 

and I get errors in the console:

The `kendo-formfield` component should contain only one control of type NgControl with a formControlName

AFAIS there's no doubled controls in formfield. In other form I have simmilar controls and getting no errors and I'm stuck on this issue. What I'm doing wrong?


Robert
Top achievements
Rank 2
 updated question on 07 Oct 2022
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?