SAP / ui5-webcomponents-ngx

UI5 Web Components for Angular provides directives for each UI5 Web Component. The directives allow to easily build your Angular application following the SAP Design System.
https://ui5-webcomponents-ngx.netlify.app/
Apache License 2.0
23 stars 4 forks source link

[Combobox, MultiCombobox]: No FormControl support #91

Closed ilhan007 closed 6 months ago

ilhan007 commented 8 months ago

Created the issue on behalf of SAP Build Process Automation: Combobox, MultiCombobox - FormControl support is missing.

Expected Behavior

Steps to Reproduce

  1. Go to '...'
  2. ...
  3. ...

Isolated Example

Context

Log Output / Stack Trace / Screenshots

{...}

Priority

The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria:

Note: The priority might be re-evaluated by the issue processor.

Stakeholder Info (if applicable)

github-actions[bot] commented 8 months ago

Hello @ilhan007, thank you for using ui5-webcomponents-ngx! The ui5-webcomponents-ngx team will triage your issue as soon as possible.

ilhan007 commented 8 months ago

Hello @droshev this is one of the latest issues raised. Meanwhile I will ask the authors for more information. Thank you.

ilhan007 commented 7 months ago

Hello @timogeib

The following works for me with the ComboBox:


<ui5-combobox [formControl]="cbxControl">
        <ui5-cb-item value="phone" text="Phone"></ui5-cb-item>
        <ui5-cb-item value="tablet" text="Tablet"></ui5-cb-item>
        <ui5-cb-item value="desktop" text="Desktop"></ui5-cb-item>
 </ui5-combobox>
 FormControl value: {{ cbxControl.value }}, touched: {{ cbxControl.touched }}
<button (click)="updateCbxFormModel()">cbxControl.setValue("phone")</button>

import { Component } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';

@Component({
  selector: 'reactive-form-sample',
  templateUrl: './reactiveFormSample.component.html',
})
export class ReactiveFormsSample {

  cbxControl = new FormControl('desktop');

  updateCbxFormModel() {
    this.cbxControl.setValue("phone");
  }
}

https://github.com/SAP/ui5-webcomponents-ngx/assets/15702139/46400410-73ca-4a1d-85ed-05623e2e07e8

timogeib commented 7 months ago

@ilhan007 Please be aware of the touched flag, which will not be set to true...

g-cheishvili commented 6 months ago

All works, except the fact that the value should be something. It can not be undefined or null and if that's the problem, the issue should be recorded in @ui5/webcomponents repository