-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Select within BelongsToMany fields() #6512
Comments
I found what is the issue (though this still might be a bug). In if (!$product) {
$field->readonly();
return;
} Even if I later set it as if (!$product) {
return;
} Is this normal behavior? |
Hi @Norgul 👋 |
@jeremynikolic thanks for the answer. I know |
Ah got you ! My bad, I missed that extra disabling I'll look into it 🕵️ |
@Norgul I've been investigating this and the readonly change is actually well received and accounted for on the frontend 🤔 Something to check on your side, the screenshot you provided indicates your Looking at the code samples I am wondering if the models/resources setup may be the cause here. To go further, please provide a sample reproducing repository 🙏 |
Not sure really. As you can see from payload submitted to the API, |
I believe this is now solved with Immutable Field: https://nova.laravel.com/docs/v5/resources/fields#immutable-fields |
Description:
Not sure if this is a bug or I implemented something wrong. I have a pivot table with additional FK (
unit_id
). If I useSelect
infields()
method pointing to that additional FK, saving the relation will fail even thoughunit_id
is present in the payload in the failing request.If however I replace
Select
with a hardcodedText
orNumber
field, it will have the same payload, but will go through.The text was updated successfully, but these errors were encountered: