Topic: problem rendering data changed programatically in datatable

Rogelio Sanchez free asked 5 years ago


Expected behavior

I'm using mdb-datatable component, and as I've seen the documentation, I found some attributes that can reload data when the source is an api.

Actual behavior

However I've built my own object structure, and I've changed tha data programatically, I have a "checked" property in every object, and when I change that value, the data doesn't seem to refresh. Any ideas of why is this happening?

Resources (screenshots, code snippets etc.)

code: var object = {
          checkbox:
            '<input  class="form-check-input" type="checkbox" name="checkboxGuest" id="checkboxEvent_' +
            value.uuid +
            '><label for="checkboxEvent_' +
            value.uuid +
            '" class="label-table"></label>',
          name: value.firstName + " " + value.lastName
        };
        aux.data.rows.push(object);

https://drive.google.com/open?id=1mwItlhT6JfhiqaVc0OW1IUJ9P8WAeik1


Mikołaj Smoleński staff answered 5 years ago


Hi there,

The issue is connected with the object reactivity problems in Vue. Please check out the following docs for more information: https://vuejs.org/v2/guide/reactivity.html

Best regards



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 5.8.2
  • Device: Mac
  • Browser: google chrome
  • OS: IOS
  • Provided sample code: No
  • Provided link: Yes