You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the objects in the BelongsToManyField get filtered based on the value in the field above it.
When I update my parent field (in this case Class Subject) to something else, it is allowing me to save the updations even though the selected objects in the BelongsToManyField don't match the parent field anymore (Class Subject).
Is it possible to clear the selected objects in the BelongsToManyField if the parent field is updated?
The text was updated successfully, but these errors were encountered:
What is the solution of this issue? While we change parent option it should remove the child selected options which is not related to parent. And if we save it with different parent and child options which are not belongs to each other data is saved.
I have to clear child selected data from options when we change parent options. What is the solution of this?
BelongsToManyField::make('Questions','questions', 'App\Nova\Question')
->optionsLabel('title')
->showOnUpdating(true)
->dependsOn('class_subject','class_subject_id')
Note that the objects in the BelongsToManyField get filtered based on the value in the field above it.
When I update my parent field (in this case Class Subject) to something else, it is allowing me to save the updations even though the selected objects in the BelongsToManyField don't match the parent field anymore (Class Subject).
Is it possible to clear the selected objects in the BelongsToManyField if the parent field is updated?
The text was updated successfully, but these errors were encountered: