Core: Pass the rest of to props to Select (#22776)

* Pass the rest of to props to Select

* Remove log
This commit is contained in:
Alex Khomenko 2020-03-13 14:07:15 +02:00 committed by GitHub
parent ebc9549cbc
commit 451c95808d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,13 @@ const getDashboards = (query = '') => {
});
};
export const DashboardPicker: FC<Props> = ({ onSelected, currentDashboard, size = 'md', isClearable = false }) => {
export const DashboardPicker: FC<Props> = ({
onSelected,
currentDashboard,
size = 'md',
isClearable = false,
...rest
}) => {
const debouncedSearch = debounce(getDashboards, 300, {
leading: true,
trailing: true,
@ -43,6 +49,7 @@ export const DashboardPicker: FC<Props> = ({ onSelected, currentDashboard, size
placeholder="Select dashboard"
noOptionsMessage="No dashboards found"
value={currentDashboard}
{...rest}
/>
);
};