mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Graph] Enable partial pasting in drilldowns (#96830)
This commit is contained in:
parent
f67f0e80e7
commit
0260dacfc8
1 changed files with 6 additions and 3 deletions
|
@ -216,15 +216,18 @@ export function UrlTemplateForm(props: UrlTemplateFormProps) {
|
|||
value={currentTemplate.url}
|
||||
onChange={(e) => {
|
||||
setValue('url', e.target.value);
|
||||
setAutoformatUrl(false);
|
||||
if (
|
||||
(e.nativeEvent as InputEvent)?.inputType !== 'insertFromPaste' ||
|
||||
!isKibanaUrl(e.target.value)
|
||||
) {
|
||||
setAutoformatUrl(false);
|
||||
}
|
||||
}}
|
||||
onPaste={(e) => {
|
||||
e.preventDefault();
|
||||
const pastedUrl = e.clipboardData.getData('text/plain');
|
||||
if (isKibanaUrl(pastedUrl)) {
|
||||
setAutoformatUrl(true);
|
||||
}
|
||||
setValue('url', pastedUrl);
|
||||
}}
|
||||
isInvalid={urlPlaceholderMissing || (touched.url && !currentTemplate.url)}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue