DataLinks: Enable multiple data links per panel (#18434)

In response to #18282

DataLinksEditor does not limit amount of links by default now (it was 1 link before, unless maxLinks prop was specified). Also, links that do not have label specified, are not rendered anymore.
This commit is contained in:
Dominik Prokop
2019-08-07 14:13:19 +02:00
committed by GitHub
parent 151b40ee2f
commit c38804216c
3 changed files with 12 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ export const DataLinksEditor: FC<DataLinksEditorProps> = React.memo(({ value, on
</div>
)}
{(!value || (value && value.length < (maxLinks || 1))) && (
{(!value || (value && value.length < (maxLinks || Infinity))) && (
<Button variant="inverse" icon="fa fa-plus" onClick={() => onAdd()}>
Create link
</Button>