Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating value of form control in fluent-text-input doesn't work #181

Open
q-rebeccawalters opened this issue Jan 6, 2025 · 2 comments
Open

Comments

@q-rebeccawalters
Copy link

q-rebeccawalters commented Jan 6, 2025

when we bind an angular form to the fluent-text-input component, e.g.,
<fluent-text-input [qeAutofocus] placeholder="Name" formControlName="name"/>
if we try and update the value of the control in the component, e.g.,
this.form.controls.name.setValue('foo')
the control isn't updated. The expected behaviour is that if you change the value of the form controller it should update the value of the input, but it doesn't seem to change dynamically

@q-rebeccawalters
Copy link
Author

q-rebeccawalters commented Jan 9, 2025

we can see that the way it is done in fluent-text-input, the current writeValue is written:

writeValue(value) {
        this.value = value;
        if (value) {
            this.renderer.setAttribute(this.el, 'value', value);
        }
    }

which seems to result in us being able to clear the inputs value. This is the library we are using @fabric-msft/fluent-angular version: 1.0.0-beta

@IdanGoldfarb1989
Copy link
Contributor

Hi,
We will contact the team responsible for the UI kit to get their input.

Thanks,
Idan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants