diff --git a/packages/x-components/src/components/animations/disable-animation.mixin.ts b/packages/x-components/src/components/animations/disable-animation.mixin.ts index 9581fa47cf..6d48c14dc7 100644 --- a/packages/x-components/src/components/animations/disable-animation.mixin.ts +++ b/packages/x-components/src/components/animations/disable-animation.mixin.ts @@ -1,5 +1,5 @@ -import Vue from 'vue'; -import { Component, Inject } from 'vue-property-decorator'; +import Vue, { inject } from 'vue'; +import { Component } from 'vue-property-decorator'; import { DISABLE_ANIMATIONS_KEY } from '../decorators/injection.consts'; /** @@ -21,8 +21,7 @@ export default class DisableAnimationMixin extends Vue { * * @public */ - @Inject({ from: DISABLE_ANIMATIONS_KEY as string, default: false }) - public disableAnimation!: boolean; + public disableAnimation = inject(DISABLE_ANIMATIONS_KEY as string, false); /** * The animation's name based on the {@link DisableAnimationMixin.disableAnimation} flag.