BooleanGroup Options callback #6485
Unanswered
niekdemelker
asked this question in
Ideas & Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
On the field 'BooleanGroup' there is an function named 'options()'. This function immediately resolved the callback provided. This presents us with some code execution even if the field is hidden for a user. I for example use the options function to fetch results from the database, resulting in querying the database even if the field is not displayed.
This behavior seems to be different from the 'Select' options function, witch uses a callback to only resolve this in the 'jsonSerialize'.
i would love to see the BooleanGroup field use the
$this->optionsCallback
property and only resolve it when presented to the user. The 'Select' field uses serializeOptions() so maybe this can be reused in the 'BooleanGroup'.Beta Was this translation helpful? Give feedback.
All reactions