Skip to content

Commit 1ec1f5a

Browse files
Fix double onChange event in Fabric TextInput by checking m_comingFromState
Co-authored-by: HariniMalothu17 <[email protected]>
1 parent d3d95af commit 1ec1f5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ void WindowsTextInputComponentView::OnTextUpdated() noexcept {
12401240

12411241
m_state->updateState(std::move(data));
12421242

1243-
if (m_eventEmitter && !m_comingFromJS) {
1243+
if (m_eventEmitter && !m_comingFromJS && !m_comingFromState) {
12441244
// call onChange event
12451245
auto emitter = std::static_pointer_cast<const facebook::react::WindowsTextInputEventEmitter>(m_eventEmitter);
12461246
facebook::react::WindowsTextInputEventEmitter::OnChange onChangeArgs;

0 commit comments

Comments
 (0)