Repository navigation
FluentUI inputs firing infinite loop #38
Replies: 4 comments 1 reply
|
I see a slightly difference between inputs and fluent-inputs <!-- -------v binding to "value" property -->
<fluent-number-field .value={model.ProposedDesignEui.CostMean}
@change={Ev (fun e -> SetProposedEui { model.ProposedDesignEui with CostMean = e.target?value } |> dispatch)}>
Cost Mean
</fluent-number-field>
<!-- vs -->
<!-- -------v not binding to "value" property -->
<input type="number" value={model.ProposedDesignEui.CostMean}
@change={Ev (fun e -> SetProposedEui { model.ProposedDesignEui with CostMean = e.target?value } |> dispatch)} />if you add the dot to the native inputs (as in |
|
Yes, this maybe something similar to the difference of controlled/uncontrolled inputs in React. By using As @AngelMunoz suggests, I'd try using the |
|
The |
|
I started to file a bug on the Fluent UI repo but they require a repo that reproduces the problem. Then I noticed that they have almost 700 open issues and decided that it's probably not worth my time to create one with that many open issues. 😬😆 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
FYI,
I ran into an issue that turned out to be related to the FluentUI inputs yesterday.
I had a form that with a bunch of Fluent UI inputs (numeric and other textboxes). On form load I made a request to load the real values, but when I set the entity with the real values to my model, the page would freeze.
The
@changeevents on my inputs were setting off an infinite loop.I wonder if FluentUI inputs
@changeevent was not checking to see if new value was different and so was needlessly refiring.I changed them to regular
inputand it resolved the issue:All reactions