feat: Add tracking of search source in UI

This commit is contained in:
Tom Moor
2020-09-24 21:56:37 -07:00
parent 40d52e9a78
commit 6f1f855083
6 changed files with 24 additions and 11 deletions

View File

@ -12,6 +12,7 @@ import { searchUrl } from "utils/routeHelpers";
type Props = {
history: RouterHistory,
theme: Object,
source: string,
placeholder?: string,
collectionId?: string,
};
@ -33,7 +34,10 @@ class InputSearch extends React.Component<Props> {
handleSearchInput = (ev) => {
ev.preventDefault();
this.props.history.push(
searchUrl(ev.target.value, this.props.collectionId)
searchUrl(ev.target.value, {
collectionId: this.props.collectionId,
ref: this.props.source,
})
);
};