import { ServiceRepository } from '~/services/services';
import { FilterBuilder } from '../../services/api/filter-builder';
import { debounce } from 'debounce';
-import { ListItemText } from '@material-ui/core';
+import { ListItemText, Typography } from '@material-ui/core';
import { noop } from 'lodash/fp';
export interface Person {
renderSuggestion({ firstName, lastName, email }: UserResource) {
return (
<ListItemText>
- {`${firstName} ${lastName} <<${email}>>`}
+ <Typography noWrap>{`${firstName} ${lastName} <<${email}>>`}</Typography>
</ListItemText>
);
}
}
handleCreate = () => {
- const { onCreate = noop } = this.props;
- this.setState({ value: '', suggestions: [] });
- onCreate({
- email: '',
- name: '',
- uuid: this.state.value,
- });
+ const { onCreate } = this.props;
+ if (onCreate) {
+ this.setState({ value: '', suggestions: [] });
+ onCreate({
+ email: '',
+ name: '',
+ uuid: this.state.value,
+ });
+ }
}
handleSelect = ({ email, firstName, lastName, uuid }: UserResource) => {