Antd version 4.18.3 introduced a small change (https://github.com/ant-design/ant-design/pull/33644/files#diff-2bf6ed805cec0d6717765729f24ab52e77149471de0b5ad3a568c9ad1c6c297bR228) that only hides the help label between the form item input and the description field if the value of the help property is undefined. Before the change any falsy value would do. Unfortunately this looks pretty weird in conjunction with the description field as the description is shifted away from the input in a way that they seem disjoint. It even looks as if the description belonged to the form item below it. Just to give you an impression of how that looks like, below is a screenshots of the same form with the antd versions 4.18.2 and 4.18.3 respectively:
Set up rjsf with a version of antd that is higher than 4.18.3 and use form items with descriptions.
Expected behavior
The help label is only shown if there is actual help content. The description field should be right below the form input element without a wide gap between them.
Actual behavior
An empty help label is shown if there is no help or error information. The description field is shifted down with a notable gap between the form input element and the description field.
Prerequisites
Description
Antd version 4.18.3 introduced a small change (https://github.com/ant-design/ant-design/pull/33644/files#diff-2bf6ed805cec0d6717765729f24ab52e77149471de0b5ad3a568c9ad1c6c297bR228) that only hides the help label between the form item input and the description field if the value of the help property is undefined. Before the change any falsy value would do. Unfortunately this looks pretty weird in conjunction with the description field as the description is shifted away from the input in a way that they seem disjoint. It even looks as if the description belonged to the form item below it. Just to give you an impression of how that looks like, below is a screenshots of the same form with the antd versions 4.18.2 and 4.18.3 respectively:
The fix should be fairly simple. The expression in https://github.com/rjsf-team/react-jsonschema-form/blob/master/packages/antd/src/templates/FieldTemplate/index.js#L68 needs to be changed from
to
or better still to
which is a bit easier on the eyes.
Here is a very simple example that reproduces the problem: https://stackblitz.com/edit/react-5zxqns-zozml8?file=index.js
Here is the exact same example but with a version of antd (4.18.2) that didn't yet cause that behaviour: https://stackblitz.com/edit/react-5zxqns-gy4vis?file=index.js
Steps to Reproduce
Set up rjsf with a version of antd that is higher than 4.18.3 and use form items with descriptions.
Expected behavior
The help label is only shown if there is actual help content. The description field should be right below the form input element without a wide gap between them.
Actual behavior
An empty help label is shown if there is no help or error information. The description field is shifted down with a notable gap between the form input element and the description field.
Version