Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boolean/Checkbox missing Title in Semantic-ui #3302

Closed
4 tasks done
mmcgurn opened this issue Dec 18, 2022 · 1 comment · Fixed by #3320
Closed
4 tasks done

Boolean/Checkbox missing Title in Semantic-ui #3302

mmcgurn opened this issue Dec 18, 2022 · 1 comment · Fixed by #3320
Assignees
Labels
bug semantic-ui semantic-ui related theme issue

Comments

@mmcgurn
Copy link

mmcgurn commented Dec 18, 2022

Prerequisites

What theme are you using?

semantic-ui

Version

5.0.0-beta.14

Current Behavior

When using Semantic-ui and the default checkbox for boolean there is not title with the checkbox.
image

Expected Behavior

I would expect there to be a title like the other themes (shown in example is default theme).
image

Steps To Reproduce

It can be reproduced in the playground,
https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6ZmFsc2UsInNjaGVtYSI6eyJ0aXRsZSI6IkEgc2luZ2xlLWZpZWxkIGZvcm0iLCJkZXNjaXB0aW9uIjoiQSBzaW5nbGUtZmllbGQgZm9ybSIsInR5cGUiOiJib29sZWFuIn0sInVpU2NoZW1hIjp7fSwidGhlbWUiOiJzZW1hbnRpYy11aSIsImxpdmVTZXR0aW5ncyI6eyJzaG93RXJyb3JMaXN0IjoidG9wIiwidmFsaWRhdGUiOmZhbHNlLCJkaXNhYmxlIjpmYWxzZSwicmVhZG9ubHkiOmZhbHNlLCJvbWl0RXh0cmFEYXRhIjpmYWxzZSwibGl2ZU9taXQiOmZhbHNlfX0=

Environment

No response

Anything else?

No response

@mmcgurn mmcgurn added bug needs triage Initial label given, to be assigned correct labels and assigned labels Dec 18, 2022
@heath-freenome heath-freenome added semantic-ui semantic-ui related theme issue and removed needs triage Initial label given, to be assigned correct labels and assigned labels Dec 19, 2022
@heath-freenome
Copy link
Collaborator

@jacqueswho This looks like a quick fix. The use of the getDisplayLabel() code is wrong here since it returns false for boolean fields and this wants a label. Can you fix?

@jacqueswho jacqueswho linked a pull request Dec 21, 2022 that will close this issue
8 tasks
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Dec 28, 2022
fixes: rjsf-team#3302, rjsf-team#3314, rjsf-team#3315, rjsf-team#3316 and rjsf-team#3317

- In `@rjsf/antd`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/bootstrap-4`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
  - Also, remove the one off tests for `AddButton` and `CheckboxWidget` since they are duplicated elsewhere
- In `@rjsf/chakra-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/core`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also, passed `registry` into the `SubmitButton` inside of the `Form` as part of this fix
  - Updated `ArrayField` to pass the new `totalItems` prop to the `ArrayFieldItemTemplate` instances
    - Also refactored the near duplicate logic for `onAddClick` and `onAddIndexClick` into a new `_handleAddClick()` function
- In `@rjsf/fluent-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/material-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/mui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/semantic-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also fixed the `CheckboxWidget` missing label issue
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/utils`, updated the `SubmitButtonProps` and `IconButtonProps` to add required `registry` prop
  - Updated the `ArrayFieldTemplateItemType` to add the new `totalItems` prop
- Updated the `custom-templates.md` file to add documentation for the new props added to the types
- Updated the `CHANGELOG.md` file accordingly
heath-freenome added a commit that referenced this issue Dec 28, 2022
fixes: #3302, #3314, #3315, #3316 and #3317

- In `@rjsf/antd`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/bootstrap-4`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
  - Also, remove the one off tests for `AddButton` and `CheckboxWidget` since they are duplicated elsewhere
- In `@rjsf/chakra-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/core`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also, passed `registry` into the `SubmitButton` inside of the `Form` as part of this fix
  - Updated `ArrayField` to pass the new `totalItems` prop to the `ArrayFieldItemTemplate` instances
    - Also refactored the near duplicate logic for `onAddClick` and `onAddIndexClick` into a new `_handleAddClick()` function
- In `@rjsf/fluent-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/material-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/mui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/semantic-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also fixed the `CheckboxWidget` missing label issue
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/utils`, updated the `SubmitButtonProps` and `IconButtonProps` to add required `registry` prop
  - Updated the `ArrayFieldTemplateItemType` to add the new `totalItems` prop
- Updated the `custom-templates.md` file to add documentation for the new props added to the types
- Updated the `CHANGELOG.md` file accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
fixes: rjsf-team#3302, rjsf-team#3314, rjsf-team#3315, rjsf-team#3316 and rjsf-team#3317

- In `@rjsf/antd`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/bootstrap-4`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
  - Also, remove the one off tests for `AddButton` and `CheckboxWidget` since they are duplicated elsewhere
- In `@rjsf/chakra-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/core`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also, passed `registry` into the `SubmitButton` inside of the `Form` as part of this fix
  - Updated `ArrayField` to pass the new `totalItems` prop to the `ArrayFieldItemTemplate` instances
    - Also refactored the near duplicate logic for `onAddClick` and `onAddIndexClick` into a new `_handleAddClick()` function
- In `@rjsf/fluent-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/material-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/mui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/semantic-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also fixed the `CheckboxWidget` missing label issue
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/utils`, updated the `SubmitButtonProps` and `IconButtonProps` to add required `registry` prop
  - Updated the `ArrayFieldTemplateItemType` to add the new `totalItems` prop
- Updated the `custom-templates.md` file to add documentation for the new props added to the types
- Updated the `CHANGELOG.md` file accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
fixes: rjsf-team#3302, rjsf-team#3314, rjsf-team#3315, rjsf-team#3316 and rjsf-team#3317

- In `@rjsf/antd`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/bootstrap-4`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
  - Also, remove the one off tests for `AddButton` and `CheckboxWidget` since they are duplicated elsewhere
- In `@rjsf/chakra-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/core`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also, passed `registry` into the `SubmitButton` inside of the `Form` as part of this fix
  - Updated `ArrayField` to pass the new `totalItems` prop to the `ArrayFieldItemTemplate` instances
    - Also refactored the near duplicate logic for `onAddClick` and `onAddIndexClick` into a new `_handleAddClick()` function
- In `@rjsf/fluent-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/material-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/mui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/semantic-ui`, pass the new `registry` prop into all of the `ButtonTemplates` usages, filtering it out when spreading props into the underlying button implementation
  - Updated `CheckboxWidget` to get the `required` state of the checkbox from the `schemaRequiresTrueValue()` utility function rather than the `required` prop
  - Also fixed the `CheckboxWidget` missing label issue
  - Also updated the `CheckboxWidget` tests to verify the label is passed correctly
- In `@rjsf/utils`, updated the `SubmitButtonProps` and `IconButtonProps` to add required `registry` prop
  - Updated the `ArrayFieldTemplateItemType` to add the new `totalItems` prop
- Updated the `custom-templates.md` file to add documentation for the new props added to the types
- Updated the `CHANGELOG.md` file accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug semantic-ui semantic-ui related theme issue
Projects
None yet
3 participants