diff --git a/packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx b/packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx index 08d466c35ae..c3463275cf6 100644 --- a/packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx +++ b/packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx @@ -111,11 +111,13 @@ export const DataLinkInput: React.FC = ({ value, onChange, s setShowingSuggestions(true); } - if (event.key === 'Backspace') { + if (event.key === 'Enter') { + // Preventing entering a new line + // As of https://github.com/ianstormtaylor/slate/issues/1345#issuecomment-340508289 + return false; + } else { // @ts-ignore return; - } else { - return true; } };