| 
									
										
										
										
											2020-03-27 04:48:46 +08:00
										 |  |  | import React from 'react'; | 
					
						
							| 
									
										
										
										
											2022-04-22 21:33:13 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-07 19:03:18 +08:00
										 |  |  | import { DataLink, DataLinksFieldConfigSettings, StandardEditorProps, VariableSuggestionsScope } from '@grafana/data'; | 
					
						
							| 
									
										
										
										
											2022-06-14 23:05:11 +08:00
										 |  |  | import { DataLinksInlineEditor } from '@grafana/ui'; | 
					
						
							| 
									
										
										
										
											2020-03-27 04:48:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-07 19:03:18 +08:00
										 |  |  | type Props = StandardEditorProps<DataLink[], DataLinksFieldConfigSettings>; | 
					
						
							| 
									
										
										
										
											2023-03-15 22:56:09 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export const DataLinksValueEditor = ({ value, onChange, context }: Props) => { | 
					
						
							| 
									
										
										
										
											2020-03-27 04:48:46 +08:00
										 |  |  |   return ( | 
					
						
							|  |  |  |     <DataLinksInlineEditor | 
					
						
							|  |  |  |       links={value} | 
					
						
							|  |  |  |       onChange={onChange} | 
					
						
							|  |  |  |       data={context.data} | 
					
						
							| 
									
										
										
										
											2021-03-25 15:33:13 +08:00
										 |  |  |       getSuggestions={() => (context.getSuggestions ? context.getSuggestions(VariableSuggestionsScope.Values) : [])} | 
					
						
							| 
									
										
										
										
											2020-03-27 04:48:46 +08:00
										 |  |  |     /> | 
					
						
							|  |  |  |   ); | 
					
						
							|  |  |  | }; |