labelField 支持
This commit is contained in:
parent
3056489d87
commit
0454cc2471
|
@ -52,6 +52,7 @@ export default class ButtonGroupControl extends React.Component<
|
|||
disabled,
|
||||
options,
|
||||
value,
|
||||
labelField,
|
||||
placeholder,
|
||||
btnClassName,
|
||||
btnActiveClassName,
|
||||
|
@ -76,7 +77,7 @@ export default class ButtonGroupControl extends React.Component<
|
|||
return render(
|
||||
`option/${key}`,
|
||||
{
|
||||
label: option.label,
|
||||
label: option[labelField || 'label'],
|
||||
icon: option.icon,
|
||||
size: option.size || size,
|
||||
type: 'button',
|
||||
|
|
|
@ -10,6 +10,7 @@ export interface RadiosProps extends OptionsControlProps {
|
|||
placeholder?: any;
|
||||
columnsCount?: number;
|
||||
labelClassName?: string;
|
||||
labelField?: string;
|
||||
}
|
||||
|
||||
export default class RadiosControl extends React.Component<RadiosProps, any> {
|
||||
|
@ -61,7 +62,8 @@ export default class RadiosControl extends React.Component<RadiosProps, any> {
|
|||
columnsCount,
|
||||
classPrefix,
|
||||
itemClassName,
|
||||
labelClassName
|
||||
labelClassName,
|
||||
labelField
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
|
@ -75,6 +77,7 @@ export default class RadiosControl extends React.Component<RadiosProps, any> {
|
|||
extractValue={extractValue!}
|
||||
delimiter={delimiter!}
|
||||
labelClassName={labelClassName}
|
||||
labelField={labelField}
|
||||
placeholder={placeholder}
|
||||
options={options}
|
||||
columnsCount={columnsCount}
|
||||
|
|
Loading…
Reference in New Issue