Skip to content
Snippets Groups Projects
Unverified Commit 78272851 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Fix - Clicking Saved Questions option in data selector when instance have no...

Fix - Clicking Saved Questions option in data selector when instance have no questions leads to Raw Data option instead (#32173)

* Fix #29760

* Refactor data types computation

* Refactor DataPickerContainer
- replace HOC entity loaders with hooks
- extract useDataPickerConfig

* Extract useDataPickerConfig

* Use named exports

* Move DATA_BUCKET to DataPicker container

* Move DEFAULT_DATA_PICKER_FILTERS to constants

* Update DATA_BUCKET to match DataPickerDataType

* Use useDataPickerConfig in DataSelectorDataBucketPicker

* Reuse DATA_BUCKET in DataPicker utils

* Rename DataPickerContainer to DataPicker
- refactor default export to named export

* Sort imports

* Fix import

* Rename identifiers

* Move database filtering out of useDataPickerConfig
- Reuse DataTypeInfoItem type
- Remove Bucket type
- Make getDataTypes conditionally return raw data option

* Simplify condition

* Extract hasDataAccess out of useDataPickerConfig

* Extract constants out of getDataTypes

* Fix typo

* Simplify approach, remove hooks

* Improve diff

* Lift getDataTypes call

* Fix build

* Add more DataSelectorDataBucketPicker unit tests

* Remove unused hasUsableSavedQuestions

* Extract utils unit tests

* Extract setup function

* Fix hasNestedQueriesEnabled selector

* Fix onChangeDataBucket

* Fix displaying saved questions

* Add repro unit tests

* Move constants to appropriate file

* Use the same setup in tests

* Fix typo

* Make sure tests pass

* Use data-testid instead of making assumptions about DOM structure
parent b16edd32
No related branches found
No related tags found
No related merge requests found
Showing
with 311 additions and 149 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment