Skip to content

Error while using table component outside of the Enso ecosystem with Vue 3 #35

@carlo-cocco

Description

@carlo-cocco

This is a bug | feature request.

Prerequisites

  • [X ] Are you running the latest version?
  • [X ] Are you reporting to the correct repository?
    (enso is made of many specialized packages: https://github.com/laravel-enso)
  • [ X] Did you check the documentation?
  • [X ] Did you perform a cursory search?

Description

When I try to use table component outside of the Enso ecosystem, I have that error:

Uncaught TypeError: this.http is undefined
    init CoreTable.vue:219
    created CoreTable.vue:205

I don't know if that is a component bug or if I'm use it wrongly.
I'm using Vue 3, that is my code, as documentation suggest to do:

import Vue from 'vue';
import axios from 'axios';
import Toastr from '@enso-ui/toastr/bulma';
import ToastrPlugin from '@enso-ui/toastr';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { VueTable } from '@enso-ui/tables/bulma';

Vue.component('fa', FontAwesomeIcon);

Vue.use(ToastrPlugin, {
    layout: Toastr,
    options: {
        duration: 3500,
        position: 'right',
    },
});

window.axios = axios;
const App = Vue.createApp({
	components: {
		Toastr,
		ToastrPlugin,
		FontAwesomeIcon,
        VueTable,
        axios,
	},
    data() {
        return {	
        }
    },
    methods: {
    },
    mounted() {
    },
    computed: {
    },
});

App.use(VueTable);

const vm = App.mount("#v_app");

Any help? Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions