1 min read

Different interface when batch editing items

Build an interface that uses a different view when batch editing items.

Are you building an interface and need a different view when users are batch editing items? There are 2 properties to help with this, batchMode and batchActive.

Batch Mode

This property is a boolean that will only be true when the user is batch editing content. You can use this property to change the appearance or functionality of your extension while in Batch mode. Here is an example of the batch view.

Batch Active

Much like batch mode, this property is only true when the interface is ticked and active for editing. For example, your interface could have a notice while batchActive is false, then reveal your interface when it's true.

Usage

On your interface.vue, add the properties:

const props = defineProps<{
  batchMode: boolean;
  batchActive: boolean;
}>();

Then you can use these to change your interface if these become true.

Conclusion

With the 2 properties, batchMode and batchActive, you can alter your interface when users are batch editing items.

Send me a coffee