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

make Semantic-UI's AddButton not show an empty label #3142

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ should change the heading of the (upcoming) version to include a major version b
## @rjsf/semantic-ui
- Updated the `FieldErrorTemplate` to use the `children` variation of the `List.Item` that supports ReactElement
- Pass `uiSchema` appropriately to all of the `IconButton`s, `ArrayFieldItemTemplate` and `WrapIfAdditional` components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)
- Fixed `ArrayFieldTemplate` and `ObjectFieldTemplate`'s `AddButton` to show the non-labeled version. (https://github.com/rjsf-team/react-jsonschema-form/pull/3142)

## @rjsf/utils
- Updated the `FieldErrorProps` type to make it support an array of string and ReactElement
Expand Down
2 changes: 1 addition & 1 deletion packages/semantic-ui/src/AddButton/AddButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button, Icon } from "semantic-ui-react";

function AddButton({ uiSchema, ...props }) {
return (
<Button title="Add Item" {...props} icon size="tiny" labelPosition="left">
<Button title="Add Item" {...props} icon size="tiny">
<Icon name="plus" />
</Button>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/semantic-ui/test/__snapshots__/Array.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`array fields array 1`] = `
}
>
<button
className="ui tiny icon left labeled button"
className="ui tiny icon button"
onClick={[Function]}
title="Add Item"
>
Expand Down Expand Up @@ -268,7 +268,7 @@ exports[`array fields array icons 1`] = `
}
>
<button
className="ui tiny icon left labeled button"
className="ui tiny icon button"
onClick={[Function]}
title="Add Item"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ exports[`object fields additionalProperties 1`] = `
}
>
<button
className="ui tiny icon left labeled button"
className="ui tiny icon button"
onClick={[Function]}
title="Add Item"
>
Expand Down