Skip to content

Commit

Permalink
fix(ui): checkboxes and input missing id
Browse files Browse the repository at this point in the history
  • Loading branch information
leopuleo authored and Pavel910 committed Jun 18, 2024
1 parent 97fed18 commit 22cbf86
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/app-admin/src/components/SearchUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const Search = ({ value, onChange, onEnter, inputPlaceholder = "Search..." }: Se
<SearchIcon />
</div>
<InputField
id={"search-input"}
onKeyDown={inputOnKeyDown}
className="search__input"
placeholder={inputPlaceholder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const SearchWidget = () => {
>
{({ value, onChange }) => (
<input
id={"file-manager__search-input"}
value={value}
onChange={e => onChange(e.target.value)}
placeholder={view.searchLabel || "Search all files"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const SearchInput = () => {
>
{({ value, onChange }) => (
<input
id={"trash-bin__search-input"}
value={value}
onChange={e => onChange(e.target.value)}
placeholder={vm.searchLabel}
Expand Down
4 changes: 2 additions & 2 deletions packages/app-trash-bin/src/Presentation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import {
} from "~/Gateways";
import { ITrashBinItemMapper, TrashBinItemDTO } from "~/Domain";
import { TrashBinRenderer } from "~/Presentation/TrashBinRenderer";
import { TrashBinConfigs } from "~/Presentation/TrashBinConfigs";
import { CompositionScope } from "@webiny/react-composition";
import { TrashBinListWithConfig } from "~/Presentation/configs";

export * from "~/Presentation/TrashBinConfigs";

export type TrashBinRenderPropParams = {
showTrashBin: () => void;
};
Expand Down Expand Up @@ -90,7 +91,6 @@ export const TrashBin = ({ render, ...rest }: TrashBinProps) => {
/>
</TrashBinListWithConfig>
</AcoWithConfig>
<TrashBinConfigs />
</CompositionScope>
)}
{render ? render({ showTrashBin }) : null}
Expand Down
15 changes: 6 additions & 9 deletions packages/ui/src/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { FormElementMessage } from "~/FormElementMessage";
import { FormComponentProps } from "~/types";

interface Props extends FormComponentProps {
// Component id.
id?: string;

// Component label.
label?: string;

Expand Down Expand Up @@ -37,21 +40,15 @@ class Checkbox extends React.Component<Props> {
};

public override render() {
const {
value,
label = "",
disabled,
indeterminate,
description,
validation,
onClick
} = this.props;
const { id, value, label, disabled, indeterminate, description, validation, onClick } =
this.props;

const { isValid: validationIsValid, message: validationMessage } = validation || {};

return (
<React.Fragment>
<RmwcCheckbox
id={id}
indeterminate={indeterminate}
disabled={disabled}
checked={Boolean(value)}
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17230,6 +17230,7 @@ __metadata:
"@webiny/app-security-access-management": 0.0.0
"@webiny/app-tenancy": 0.0.0
"@webiny/app-tenant-manager": 0.0.0
"@webiny/app-trash-bin": 0.0.0
"@webiny/app-websockets": 0.0.0
"@webiny/cli": 0.0.0
"@webiny/lexical-editor-actions": 0.0.0
Expand Down

0 comments on commit 22cbf86

Please sign in to comment.