mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 20:54:22 -06:00
DataLinksInput - change the way enter key is handled (#18985)
This commit is contained in:
parent
0994350e8b
commit
c66a23ea31
@ -111,11 +111,13 @@ export const DataLinkInput: React.FC<DataLinkInputProps> = ({ 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;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user