Remove silly type
This commit is contained in:
@@ -72,7 +72,7 @@ export function useItemContext() {
|
|||||||
return React.useContext(ItemContext)
|
return React.useContext(ItemContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Group<ValuesType = string>({
|
export function Group({
|
||||||
children,
|
children,
|
||||||
values: providedValues,
|
values: providedValues,
|
||||||
onChange,
|
onChange,
|
||||||
@@ -80,13 +80,13 @@ export function Group<ValuesType = string>({
|
|||||||
type = 'checkbox',
|
type = 'checkbox',
|
||||||
maxSelections,
|
maxSelections,
|
||||||
label,
|
label,
|
||||||
}: GroupProps<ValuesType>) {
|
}: GroupProps) {
|
||||||
const groupRole = type === 'radio' ? 'radiogroup' : undefined
|
const groupRole = type === 'radio' ? 'radiogroup' : undefined
|
||||||
const values = type === 'radio' ? providedValues.slice(0, 1) : providedValues
|
const values = type === 'radio' ? providedValues.slice(0, 1) : providedValues
|
||||||
const [maxReached, setMaxReached] = React.useState(false)
|
const [maxReached, setMaxReached] = React.useState(false)
|
||||||
|
|
||||||
const setFieldValue = React.useCallback<
|
const setFieldValue = React.useCallback<
|
||||||
(props: {name: ValuesType; value: boolean}) => void
|
(props: {name: string; value: boolean}) => void
|
||||||
>(
|
>(
|
||||||
({name, value}) => {
|
({name, value}) => {
|
||||||
if (type === 'checkbox') {
|
if (type === 'checkbox') {
|
||||||
|
|||||||
Reference in New Issue
Block a user