@rjsf/core 5.7.2 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1140,12 +1140,7 @@
1140
1140
  schemaUtils = _this$props4.registry.schemaUtils;
1141
1141
  var discriminator = utils.getDiscriminatorFieldFromSchema(schema);
1142
1142
  var option = schemaUtils.getClosestMatchingOption(formData, options, selectedOption, discriminator);
1143
- if (option > 0) {
1144
- return option;
1145
- }
1146
- // If the form data matches none of the options, use the currently selected
1147
- // option, assuming it's available; otherwise use the first option
1148
- return selectedOption || 0;
1143
+ return option;
1149
1144
  };
1150
1145
  _proto.getFieldId = function getFieldId() {
1151
1146
  var _this$props5 = this.props,
@@ -1758,6 +1753,9 @@
1758
1753
  label = utils.ADDITIONAL_PROPERTY_FLAG in schema ? name : uiOptions.title || props.schema.title || schema.title || name;
1759
1754
  }
1760
1755
  var description = uiOptions.description || props.schema.description || schema.description || '';
1756
+ var richDescription = uiOptions.enableMarkdownInDescription ? jsxRuntime.jsx(Markdown__default["default"], {
1757
+ children: description
1758
+ }) : description;
1761
1759
  var help = uiOptions.help;
1762
1760
  var hidden = uiOptions.widget === 'hidden';
1763
1761
  var classNames = ['form-group', 'field', "field-" + utils.getSchemaType(schema)];
@@ -1792,7 +1790,7 @@
1792
1790
  var fieldProps = {
1793
1791
  description: jsxRuntime.jsx(DescriptionFieldTemplate, {
1794
1792
  id: utils.descriptionId(id),
1795
- description: description,
1793
+ description: richDescription,
1796
1794
  schema: schema,
1797
1795
  uiSchema: uiSchema,
1798
1796
  registry: registry