Conditions not working (partially)#14488
Merged
rijkvanzanten merged 12 commits intomainfrom Jul 21, 2022
Merged
Conversation
azrikahar
reviewed
Jul 20, 2022
Contributor
azrikahar
left a comment
There was a problem hiding this comment.
Conditions works nicely from what I've tested! (nested groups, conditions based on field in another group, condition based on field in parent group, conditions for field options, time series count/countDistinct primarykey selection etc)
One minor issue with user form, which I believe is related to the change in /modules/users/routes/item.vue. Though that does make me wonder is fieldsFiltered doing anything before your change? 🤔
To reproduce the user form issue
- Create 2 new string fields in
directus_user, namedtestandtest2. - Then re-order
test2to abovetest. This step is important because it was the main trigger of such issue reported in #8560 (comment).
Result:
How it looks like before this PR
chrome_VYDYYceQ3j.mp4
How it looks like after this PR
chrome_531yHjoWwr.mp4
This reverts commit c6f4f23.
Member
Author
|
Nice catch Azri! 🙌 You're right and as the changes to |
rijkvanzanten
approved these changes
Jul 21, 2022
qborisb
pushed a commit
to qdentity/directus
that referenced
this pull request
Jul 22, 2022
* changed way of storing the formfield data in v-form * hacky translation implementation * updated translations without bombing the performance * removed debug code and refactored initial implementation * removed redundant useFormFields in users route * making proper use of useFormField results to not break the grid layout * removed limitation for conditions * Fix selection of foreign keys for value field in time series panel * Revert "removed redundant useFormFields in users route" This reverts commit c6f4f23. Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes #14285
Fixes #14392
Not all properties changed by conditions were not propagated fully after performance optimizations #14188 .
I've reverted the
formFields/fieldMetasplit in favor of afieldMapobject for better separated update tracking than in an array.To keep the
v-formsignature the same as it was i did not update the way it passes it's properties down to nested forms which adds a slight overhead for re-formatting the data on each recursion.Testing
Database: data.zip (default login)
Type of Change
Requirements Checklist
If adding a new feature: