mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Delay retrieving context for conditions (#19271)
* Delay retrieving context for conditions * Add changeset
This commit is contained in:
5
.changeset/spotty-pans-kick.md
Normal file
5
.changeset/spotty-pans-kick.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@directus/app": patch
|
||||
---
|
||||
|
||||
Resolved browser freeze in field conditions by delaying the retrieving of field context
|
||||
@@ -40,7 +40,7 @@ const props = defineProps<{
|
||||
interface?: string;
|
||||
collection?: string;
|
||||
disabled?: boolean;
|
||||
context?: ExtensionOptionsContext;
|
||||
context?: () => ExtensionOptionsContext;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -76,7 +76,7 @@ const optionsFields = computed(() => {
|
||||
|
||||
if (typeof selectedInterface.value.options === 'function') {
|
||||
optionsObjectOrArray = selectedInterface.value.options(
|
||||
props.context ?? {
|
||||
props.context?.() ?? {
|
||||
field: {
|
||||
type: 'unknown',
|
||||
},
|
||||
|
||||
@@ -92,7 +92,7 @@ const repeaterFields = computed<DeepPartial<Field>[]>(() => [
|
||||
interface: 'system-interface-options',
|
||||
options: {
|
||||
interface: interfaceId.value,
|
||||
context: fieldDetailStore,
|
||||
context: useFieldDetailStore,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user