data-driven-forms / react-forms

React library for rendering forms.
https://data-driven-forms.org/
Apache License 2.0
297 stars 86 forks source link

Warning displayed when `is` property in a condition uses a custom function #1377

Closed edhollinghurst closed 1 year ago

edhollinghurst commented 1 year ago

Description It appears that when a custom function is used for the is property in a condition, a warning is shown in the console.

Warning: Failed prop type: Invalid prop `condition` supplied to `Memo`.

SCR-20230425-jpuk

You can view the example at https://codesandbox.io/s/react-form-renderer-custom-function-condition-udj3sr

rvsia commented 1 year ago

Hello,

yes, good catch! We should add function here: https://github.com/data-driven-forms/react-forms/blob/50e054dfec6173d369031195a529e5d8b0b3101c/packages/react-form-renderer/src/condition/condition.js#L106

I can open a PR later

edhollinghurst commented 1 year ago

Thanks @rvsia !

rvsia commented 1 year ago

:tada: This issue has been resolved in version 3.20.7 :tada:

The release is available on

Data-Driven-Forms.org!