Ananth
Ananth

Reputation: 1560

Directus Repeater Field does not trigger filter hook

Using Directus version 9.8, I have created a Repeater Field with two option ( title, description ).

enter image description here

I have added data in those repeater field.

enter image description here

I have created the following hook and this hook is getting triggered when i add data to repeater field, but when i update the value of existing Repeater field, then the Hook is not getting triggered.

import { defineHook } from '@directus/extensions-sdk';

export default defineHook(({ filter, action }) => {
    filter('items.create', (input, { collection }, { schema }) => {
        console.log('Creating Item!', input, collection, schema);
    });
    filter('items.update', (input, { collection }, { schema }) => {
        console.log('Updating Item!', input, collection, schema);
    });  
});

Generally Filter hook is triggered for updation operation in normal Fields. But the issue is the filter hook is not getting triggered for updation operation for repeater field. so the console log "Updating Item" is not getting logged in to console. Please help me to fix this issue or share your thoughts.

Upvotes: 1

Views: 1172

Answers (1)

Ananth
Ananth

Reputation: 1560

Once i update to the latest version (9.10) of the Directus, then it was working fine.

Upvotes: 1

Related Questions