remove Unknown Prop Warning for KChip
@@ -10,14 +10,26 @@ export const Methods = ({ methods }: { methods: Immutable.List<string> }) => {
return (
<>
<PopupState variant="popper" popupId="methods-popup-popper">
- {(popupState) => (
+ {(popupState) => {
+ // delete popupState.disableEnforceFocus;
+
+ const hoverProps = bindHover(popupState);
+ const popupProps = bindPopover(popupState);
+ delete popupProps.anchorEl;
+ // @ts-ignore
+ delete popupProps.disableAutoFocus;
+ // @ts-ignore
+ delete popupProps.disableEnforceFocus;
+ // @ts-ignore
+ delete popupProps.disableRestoreFocus;
+ return (
<div>
<KChip
label={methods.size === httpMethods.length ? "All" : "Custom"}
color="primary"
- {...bindHover(popupState)}
+ {...hoverProps}
// for when mouse leave to poper, if not bindPopover will can't dismiss poper
- {...bindPopover(popupState)}
+ {...popupProps}
/>
<Popper {...bindPopper(popupState)} style={{ zIndex: POPPER_ZINDEX }} transition>
@@ -38,7 +50,8 @@ export const Methods = ({ methods }: { methods: Immutable.List<string> }) => {
)}
</Popper>
</div>
- )}
+ );
+ }}
</PopupState>
</>
);
