Make land use group copyable

This commit is contained in:
Maciej Ziarkowski 2020-06-25 04:50:16 +01:00
parent 4b3e2d7530
commit f83f040ee3
2 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import { DataTitleCopyable } from '../data-title';
interface MultiDataEntryProps extends BaseDataEntryProps, TextDataEntryInputProps {
value: string[];
copyable: boolean;
editableEntries: boolean;
confirmOnEnter: boolean;
@ -24,6 +25,7 @@ class MultiDataEntry extends Component<MultiDataEntryProps, MultiDataEntryState>
static defaultProps = {
editableEntries: false,
copyable: false,
confirmOnEnter: true,
addOnAutofillSelect: false,
acceptAutofillValuesOnly: false
@ -85,6 +87,7 @@ class MultiDataEntry extends Component<MultiDataEntryProps, MultiDataEntryState>
title={props.title}
tooltip={props.tooltip}
disabled={props.disabled || props.value == undefined || props.value.length === 0}
copy={props.copyable ? props.copy : undefined}
/>
<div id={`${props.slug}-wrapper`}>
<ul className="data-link-list">

View File

@ -24,6 +24,7 @@ const UseView: React.FunctionComponent<CategoryViewProps> = (props) => (
confirmOnEnter={true}
tooltip={dataFields.current_landuse_group.tooltip}
placeholder="Type new land use group here"
copyable={true}
autofill={true}
showAllOptionsOnEmpty={true}
addOnAutofillSelect={true}