Skip to content

Commit

Permalink
Prettier changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rall3n committed Mar 3, 2022
1 parent 92f07dc commit f5cba28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/react-select/src/internal/DummyInput.tsx
Expand Up @@ -10,7 +10,14 @@ export default function DummyInput({
readonly innerRef: Ref<HTMLInputElement>;
}) {
// Remove animation props not meant for HTML elements
const filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
const filteredProps = removeProps(
props,
'onExited',
'in',
'enter',
'exit',
'appear'
);

return (
<input
Expand Down
4 changes: 3 additions & 1 deletion packages/react-select/src/utils.ts
Expand Up @@ -372,7 +372,9 @@ export const removeProps = <Props extends object, K extends string[]>(
propsObj: Props,
...properties: K
): Omit<Props, K[number]> => {
let propsMap = Object.entries(propsObj).filter(([key]) => !properties.includes(key));
let propsMap = Object.entries(propsObj).filter(
([key]) => !properties.includes(key)
);

return propsMap.reduce((newProps: { [key: string]: any }, [key, val]) => {
newProps[key] = val;
Expand Down

0 comments on commit f5cba28

Please sign in to comment.