|
@@ -7,6 +7,8 @@ import type { ISelectableAndIndeterminatable } from '~/client/interfaces/selecta
|
|
|
import type { IndeterminateInputElement } from '~/interfaces/indeterminate-input-elm';
|
|
import type { IndeterminateInputElement } from '~/interfaces/indeterminate-input-elm';
|
|
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
|
|
+ inputId?: string,
|
|
|
|
|
+ inputClassName?: string,
|
|
|
isCheckboxDisabled?: boolean,
|
|
isCheckboxDisabled?: boolean,
|
|
|
onCheckboxChanged?: (isChecked: boolean) => void,
|
|
onCheckboxChanged?: (isChecked: boolean) => void,
|
|
|
children?: React.ReactNode,
|
|
children?: React.ReactNode,
|
|
@@ -14,6 +16,8 @@ type Props = {
|
|
|
|
|
|
|
|
const OperateAllControlSubstance: ForwardRefRenderFunction<ISelectableAndIndeterminatable, Props> = (props: Props, ref): JSX.Element => {
|
|
const OperateAllControlSubstance: ForwardRefRenderFunction<ISelectableAndIndeterminatable, Props> = (props: Props, ref): JSX.Element => {
|
|
|
const {
|
|
const {
|
|
|
|
|
+ inputId,
|
|
|
|
|
+ inputClassName = '',
|
|
|
isCheckboxDisabled,
|
|
isCheckboxDisabled,
|
|
|
onCheckboxChanged,
|
|
onCheckboxChanged,
|
|
|
children,
|
|
children,
|
|
@@ -54,10 +58,10 @@ const OperateAllControlSubstance: ForwardRefRenderFunction<ISelectableAndIndeter
|
|
|
return (
|
|
return (
|
|
|
<div className="d-flex align-items-center">
|
|
<div className="d-flex align-items-center">
|
|
|
<Input
|
|
<Input
|
|
|
|
|
+ id={inputId}
|
|
|
type="checkbox"
|
|
type="checkbox"
|
|
|
- id="cb-check-all"
|
|
|
|
|
data-testid="cb-select-all"
|
|
data-testid="cb-select-all"
|
|
|
- className="ms-2"
|
|
|
|
|
|
|
+ className={inputClassName}
|
|
|
innerRef={selectAllCheckboxElm}
|
|
innerRef={selectAllCheckboxElm}
|
|
|
disabled={isCheckboxDisabled}
|
|
disabled={isCheckboxDisabled}
|
|
|
onChange={checkboxChangedHandler}
|
|
onChange={checkboxChangedHandler}
|