You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.',
5231
+
])
5232
+
5233
+
// Render a fresh uncontrolled combobox
5234
+
render(<Example/>)
5235
+
5236
+
// Change to an controlled combobox
5237
+
awaitclick(getByText('to controlled'))
5238
+
5239
+
// We shouldn't have gotten another warning as we do not want to warn on every render
5240
+
expect(spy).toBeCalledTimes(1)
5241
+
})
5242
+
)
5243
+
5244
+
it(
5245
+
'should warn when changing the combobox from controlled to uncontrolled',
'A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.',
5276
+
])
5277
+
5278
+
// Render a fresh controlled combobox
5279
+
render(<Example/>)
5280
+
5281
+
// Change to an uncontrolled combobox
5282
+
awaitclick(getByText('to uncontrolled'))
5283
+
5284
+
// We shouldn't have gotten another warning as we do not want to warn on every render
5285
+
expect(spy).toBeCalledTimes(1)
5286
+
})
5287
+
)
5288
+
5199
5289
it(
5200
5290
'should sync the input field correctly and reset it when resetting the value from outside (when using displayValue)',
'A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.'
'A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.'
0 commit comments