Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const CardActions = ({ className, children, ...rest }) => {
warning(
true,
' is deprecated. Please use the component instead to wrap your action buttons'
);
const classes = useStyles({}); // the empty {} is a temp fix for https://github.com/mui-org/material-ui/issues/15942
return (
<div>
{children}
</div>
);
};
const Title = ({ className, defaultTitle, locale, record, title, ...rest }) => {
const translate = useTranslate();
const container = document.getElementById('react-admin-title');
if (!container) return null;
warning(!defaultTitle && !title, 'Missing title prop in <title> element');
const titleElement = !title ? (
<span className={className} {...rest}>
{defaultTitle}
</span>
) : typeof title === 'string' ? (
<span className={className} {...rest}>
{translate(title, { _: title })}
</span>
) : (
createElement(title, { className, record, ...rest })
);
return createPortal(titleElement, container);
};
</title>
const Title = ({
className,
defaultTitle,
locale,
record,
title,
translate,
...rest
}) => {
const container = document.getElementById('react-admin-title');
if (!container) return null;
warning(!defaultTitle && !title, 'Missing title prop in <title> element');
const titleElement = !title ? (
<span className={className} {...rest}>
{defaultTitle}
</span>
) : typeof title === 'string' ? (
<span className={className} {...rest}>
{translate(title, { _: title })}
</span>
) : (
React.cloneElement(title, { className, record, ...rest })
);
return ReactDOM.createPortal(titleElement, container);
};
</title>
InputProps: undefined,
},
optionText = 'name',
optionValue = 'id',
parse,
resource,
setFilter,
shouldRenderSuggestions: shouldRenderSuggestionsOverride,
source,
suggestionLimit,
translateChoice = true,
validate,
variant = 'filled',
...rest
}) => {
warning(
isValidElement(optionText) && !matchSuggestion,
`If the optionText prop is a React element, you must also specify the matchSuggestion prop:
true}
/>
`
);
const classes = useStyles({ classes: classesOverride });
let inputEl = useRef();
let anchorEl = useRef();
const {
id,
input,
...options
} = {},
optionText = 'name',
optionValue = 'id',
parse,
resource,
setFilter,
shouldRenderSuggestions: shouldRenderSuggestionsOverride,
source,
suggestionLimit,
translateChoice = true,
validate,
variant = 'filled',
...rest
}) => {
warning(
isValidElement(optionText) && !matchSuggestion,
`If the optionText prop is a React element, you must also specify the matchSuggestion prop:
true}
/>
`
);
const classes = useStyles({ classes: classesOverride });
let inputEl = useRef();
let anchorEl = useRef();
const {
id,
input,