diff --git a/CHANGELOG.md b/CHANGELOG.md index 72dc0e52..0b705e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- Fixed a bug in GForm's RemoteSelect where the value for Dropdown could not change + ## v1.2.8 (2023-04-06) ### Changed diff --git a/grafana-plugin/src/components/GForm/GForm.tsx b/grafana-plugin/src/components/GForm/GForm.tsx index 5e2c404a..2a9ddcdd 100644 --- a/grafana-plugin/src/components/GForm/GForm.tsx +++ b/grafana-plugin/src/components/GForm/GForm.tsx @@ -17,17 +17,19 @@ const nullNormalizer = (value: string) => { return value || null; }; -function renderFormControl(formItem: FormItem, register: any, control: any, onChangeFn: () => void) { +function renderFormControl(formItem: FormItem, register: any, control: any, onChangeFn: (field, value) => void) { switch (formItem.type) { case FormItemType.Input: - return ; + return ( + onChangeFn(undefined, value)} /> + ); case FormItemType.TextArea: return (