This commit uses GroupChooser as the input for param input of type
group_id. Meanwhile, it improves invalid group validation and semantic
error prompts.
This commit refactors the category id normalization of param-input to
use `Category.asyncFindBySlugPath`.
Now, the category id input will use an async query when the
default/initial value is category slug.
Co-authored-by: Natalie <1555215+nattsw@users.noreply.github.com>
The `onSubmit` hook will only be triggered when the form is valid, so we
need to clear the contents of `serializedData` in advance in `submit`.
Otherwise, it may not throw a validation error.
What does this fix?
===================
When creating a data explorer query that includes parameters, the
parameter input boxes don’t display until the page is refreshed.
After this commit, when the query is saved, the input boxes will appear.
ref: t/113297
During the upgrade to Octane group reports did not have the necessary 'updateParams' function added to have the param input changes bubble up to the parent. This PR adds the missing function as well as a small test to check that params can be inputted as expected (inserting a param would error previously).
After running a query with a non-default query param (inserting the new param into the url) we want to have the same params available after reloading the page. To do this we need to pass the updated params back up to the parent due to Octane's one direction data stream. I went over this with @pmusaraj and we both agreed this was extremely difficult to test due to needing to reload the page in a test, so we opted to move forward without one. A system test could be helpful in this case... I will investigate in a follow up PR.
- Move param-input tests to a dedicated file
When there were no query results it would throw an error due to `this.resultCount` always passing as it is in the format of
```
"INTEGER - results returned"
```
so we need to grab the first index of the string and check if the integer is great than 0