We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04ae3de commit 6e8febfCopy full SHA for 6e8febf
config/fields/mixins/options.php
@@ -14,6 +14,9 @@
14
* An array with options
15
*/
16
'options' => function ($options = []) {
17
+ // make sure to flush the options cache when
18
+ // new options are being passed
19
+ $this->optionsCache = null;
20
return $options;
21
},
22
/**
@@ -25,7 +28,7 @@
25
28
],
26
29
'computed' => [
27
30
'options' => function (): array {
- return $this->getOptions();
31
+ return $this->optionsCache ??= $this->getOptions();
32
}
33
34
'methods' => [
0 commit comments