diff --git a/ui/src/shared/components/flux_functions_toolbar/FluxFunctionsToolbar.tsx b/ui/src/shared/components/flux_functions_toolbar/FluxFunctionsToolbar.tsx index 322229a896..218889fe4d 100644 --- a/ui/src/shared/components/flux_functions_toolbar/FluxFunctionsToolbar.tsx +++ b/ui/src/shared/components/flux_functions_toolbar/FluxFunctionsToolbar.tsx @@ -74,7 +74,7 @@ class FluxFunctionsToolbar extends PureComponent { private handleUpdateScript = (funcName: string, funcExample: string) => { const {activeQueryText, onSetActiveQueryText} = this.props - if (funcName === 'from') { + if (funcName.startsWith('from')) { onSetActiveQueryText(`${activeQueryText}\n${funcExample}`) } else { onSetActiveQueryText(`${activeQueryText}\n |> ${funcExample}`)