TypeError: type is undefined

I want to set my array from state to v-select, this is my storage: export default ({ state: { trainerList: [] }, getters: { TRAINER_LIST(state){ console.log(state.trainerList) return state.trainerList } }, mutations: { SET_TRAINER_LIST_TO_STATE(state, trainerList){ return state.trainerList = trainerList } }, actions: { async GET_BRANCH_FROM_API({commit}){ return axios.get(`${BASE_URL}/api/trainer-list/`, { headers:{ Authorization: ‘Token ‘ + sessionStorage.getItem(‘usertoken’) } })… Read More TypeError: type is undefined

TS2322: Type '(state: State, exRep: number, exName: string) => void' is not assignable to type 'Mutation '. – Vuex/Typescript

I’m currently working with vuex and typescript but I have this error in my code and I have no idea on how to fix it. The error : TS2322: Type ‘(state: State, exRep: number, exName: string) => void’ is not assignable to type ‘Mutation ‘ My code : import { createStore } from "vuex"; import… Read More TS2322: Type '(state: State, exRep: number, exName: string) => void' is not assignable to type 'Mutation '. – Vuex/Typescript

VueJS TypeError: Cannot read properties of undefined (reading 'toLowerCase')

I can filter in a array and I delete items from this array. My problem starts when I try to add items to this array list. I get the following error: TypeError: Cannot read properties of undefined (reading ‘toLowerCase’). I am not sure why I get this error, because when I use the add mutation… Read More VueJS TypeError: Cannot read properties of undefined (reading 'toLowerCase')

Why is this console error showing after this Vuex mutation commit?

I’m quite new with Vue and Vuex, I’m having this console error after committing a declared Mutation in the store, which by the way, besides from the console error is doing its job. The error which is: ReferenceError: ADD_EVENT is not defined at eval (EventCreate.vue?89e7:82:1), it’s pretty much self-explanatory. I’m probably missing one step or… Read More Why is this console error showing after this Vuex mutation commit?

vuex dispatching action in a component function

I want to dispatch an action and get the values passed into an input. When i directly dispatch an action on a button like this: <button type="button" @click="store.dispatch("foundJobs", { nameInputValue: nameFilter.value, locationInputValue: locationFilter.value, contractCheckboxValue: contractFilter, });">Search</button> everything works perfectly fine. But when i want to make an outer function to make it more clean and… Read More vuex dispatching action in a component function

Using v-for inside component that uses <slot/> to create re-usable and dynamic Tab menu

So I’m trying to create a dynamic tab menu with Vue 3 and slots. I got the tabs working, I have BaseTabsWrapper and BaseTab components. I need to be able to v-for with BaseTab component inside of a BaseTabsWrapper Component. Like this: <section id="content" class="w-full mx-2 pr-2" v-if="incomingChatSessions && incomingChatSessions.length" > <BaseTabsWrapper> <BaseTab v-for="chatSession in… Read More Using v-for inside component that uses <slot/> to create re-usable and dynamic Tab menu

v-if function returning nothing, but it should

Running into an issue that’s been bugging me for the past 2 hours. I’ve got a function in a mixin like so: checkPermissionMeetings(type,areaID){ if(this.$store.state.global.permissions.meetings===true) { //If user has basic meeting access if(type===’write’){ Object.entries(this.$store.state.global.permissions.meeting_areas).forEach(([key, val]) => { if (parseInt(key) === parseInt(areaID) && (val === ‘write’)) { console.log(‘write_true’) return true; } }); } if(type===’read’){ Object.entries(this.$store.state.global.permissions.meeting_areas).forEach(([key, val]) =>… Read More v-if function returning nothing, but it should