nafeeur10's avatar

After parsing data is not coming in Vue Props

After calling an API. I am getting pagination data.

this.paginationProperties = JSON.parse(JSON.stringify(response.data.pagination))

Passing that like this:

<datatable
    :pagination="paginationProperties"
></datatable>

I am passing pagination with props While console.log(this.pagination then it's giving correct data but in this format:

{__ob__: Observer}
	page: 1
	pages: 3
	per_page: 10

While parsing that like below:

const newObj = { ...this.pagination }

But giving null.

0 likes
1 reply
aschmelyun's avatar

@nafeeur10 Is it a mis-type? Shouldn't you be using

const newObj = { ...this.paginationProperties }

Please or to participate in this conversation.