PartnerFilter.tsx 815 Bytes
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import * as React from 'react';
import { Field } from 'redux-form';

import SelectPartner from './SelectPartner';

interface IPartnerFilter extends React.ClassAttributes<any> {
    name: string;
    label: string;
    className?: string;
}

class PartnerFilter extends React.Component<IPartnerFilter, any> {

    public render() {
        const { name , label, className, ...other } = this.props;
        return (
            <div className={ className }>
                <Field
                    name={ `${name}.uuid` }
                    component={ SelectPartner }
                    label={ label }
                    useUuid
                    allowNull
                    multiple
                    { ...other }
                />
            </div>
        );
    }
}

export default PartnerFilter;