grafana/public/app/features/variables/query
Josh Hunt 1c6eca09bb
Variables: Explicitly type variable editor extended state (#44749)
* Narrow Variable editor state using selector functions

 - Explicitly type "extended" editor state in editor/reducter.ts using a union
 - Create selectors to narrow the types, using unique properties from each extended state to discriminate the union
 - Update DataSourceVariableEditor to use new style of redux connector
 - Update variable editor components to use new selectors

* fix tests

* Make adhoc variable infoText optional, because it is!

* Add AdHocVariableEditor tests

* DataSourceVariableEditor tests

* comment

* reset

* Wrote tests for selectors \(that actually caught a bug, whodathunkit)

* fix stray types and lint issues

* Rename selector functions
2022-02-08 09:31:42 +11:00
..
actions.test.ts Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
actions.ts Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
adapter.ts Chore: reduces circular dependencies for variables/utils.ts (#44087) 2022-01-17 12:48:26 +01:00
operators.test.ts Variables: Removes experimental Tags feature (#33361) 2021-04-27 05:57:25 +02:00
operators.ts Variables: Removes experimental Tags feature (#33361) 2021-04-27 05:57:25 +02:00
queryRunners.test.ts Variables: Fix for changing readonly query property (#35992) 2021-06-22 08:53:41 +02:00
queryRunners.ts Variables: Fix for changing readonly query property (#35992) 2021-06-22 08:53:41 +02:00
QueryVariableEditor.test.tsx Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
QueryVariableEditor.tsx Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
QueryVariableRefreshSelect.tsx Chore: Move variable field selectors to data-testid (#44801) 2022-02-04 11:55:19 +11:00
QueryVariableSortSelect.tsx Chore: Move variable field selectors to data-testid (#44801) 2022-02-04 11:55:19 +11:00
reducer.test.ts Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
reducer.ts Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
variableQueryObserver.test.ts Variables: Adds new Api that allows proper QueryEditors for Query variables (#28217) 2020-11-18 15:10:32 +01:00
variableQueryObserver.ts Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
VariableQueryRunner.test.ts Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
VariableQueryRunner.ts Variables: Handle variable cancellations better (#43987) 2022-01-14 11:19:42 +01:00