Open
Conversation
Open
|
Can depends on work for sibling depennds on filed outside simple repeatable? Select::make('Test'); |
Author
|
@laravelwebdev if I remember correctly while testing, that feature should be available out-of-the-box, but it begs the question of what happens with your repeatable fields. Because if you added 10 fields, and then change |
|
Hi, thanks for your PR! Do you know why this is not merged yet? |
Author
No idea :) |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Created functionality to enable
dependsOnfor siblings.Disclaimer: I haven't tested the feature extensively in each and every scenario, so if anyone else would benefit from this feature, please try it out and let me know if it fails somewhere.
Copying usage instructions I wrote in the readme:
dependsOn()function is made available for fields within theSimpleRepeatable. To make the feature available, be sureto use
DependsOnSiblingstrait on the resource you want to havedependsOn()available for sibling fields.Key on which the field depends on is constructed out of two parts:
{parent attribute}.{child attribute}. This keywill be made available to fetch within the function via
$request->get('parent.child').Example: