Open jfeigel opened 3 years ago
disableRipple
isn't part of the Chip API afaik:
@enricopolanski Is right, the prop is only available in some use cases. You can dodge the issue with:
import React from "react";
import { Chip } from "@material-ui/core";
export default function Demo() {
const more = { disableRipple: true };
return <Chip label="Material Chip" onClick={() => {}} {...more} />;
}
https://codesandbox.io/s/naughty-visvesvaraya-i9c59?file=/src/Demo.tsx
@enricopolanski @oliviertassinari If it isn't part of the API, how are we meant to disable the ripple effect on the chip? The solution above still spits out warnings which in turn make Jest fail
console.error
Warning: React does not recognize the `disableRipple` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disableripple` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Current Behavior 😯
disableRipple
works as expected, however a TypeScript error is thrown.TypeScript error
``` No overload matches this call. Overload 1 of 2, '(props: { component: ElementTypeExpected Behavior 🤔
No TypeScript error should be thrown.
Steps to Reproduce 🕹
Steps:
disableRipple
prop to a Chip.https://codesandbox.io/s/divine-star-nimfs?file=/src/Demo.tsx
Your Environment 🌎
tsconfig.json