Select: Preserve value when allowCustomValue is set (#87843)

* initial working poc with some better types

* move logic inside SelectBase

* add unit tests

* cleaner logic

* simpler

* update comments

* more comments

* use onMenuClose

* undo changes to cleanValue

* fix unit tests

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Ashley Harrison
2024-05-20 11:01:38 +01:00
committed by GitHub
co-authored by Dominik Prokop
parent cf407fe8de
commit 429bcbe67f
6 changed files with 81 additions and 31 deletions
+1 -5
View File
@@ -682,11 +682,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Do not use any type assertions.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Do not use any type assertions.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"]
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
],
"packages/grafana-ui/src/components/Select/SelectOptionGroup.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],