mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
use reflow to migrate from flow to typescript
This commit is contained in:
26
scm-ui/ui-components/src/GroupAutocomplete.tsx
Normal file
26
scm-ui/ui-components/src/GroupAutocomplete.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import { translate } from 'react-i18next';
|
||||
import AutocompleteProps from './UserGroupAutocomplete';
|
||||
import UserGroupAutocomplete from './UserGroupAutocomplete';
|
||||
|
||||
type Props = AutocompleteProps & {
|
||||
// Context props
|
||||
t: (p: string) => string;
|
||||
};
|
||||
|
||||
class GroupAutocomplete extends React.Component<Props> {
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
return (
|
||||
<UserGroupAutocomplete
|
||||
label={t('autocomplete.group')}
|
||||
noOptionsMessage={t('autocomplete.noGroupOptions')}
|
||||
loadingMessage={t('autocomplete.loading')}
|
||||
placeholder={t('autocomplete.groupPlaceholder')}
|
||||
{...this.props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default translate('commons')(GroupAutocomplete);
|
||||
Reference in New Issue
Block a user