MDB table editor


Topic: MDB table editor

Danny3445 pro premium priority asked 3 years ago

Hi,

I'm using MDB table editor with modals.

  1. Is it possible to give a input javascript events like onkeyup?
  2. And to change the width of the inputs? Maybe option to add classes for col's.
  3. Form validation and required fields!! important one

Dawid Wajszczuk staff answered 3 years ago

Hi,

  1. Yes, you can do something similar to this https://mdbootstrap.com/snippets/standard/d-wajszczuk/3564267#js-tab-view
  2. There is width option. https://mdbootstrap.com/docs/standard/plugins/table-editor/ under API tab you have all the available options.
  3. Currently there is no such option. But I have added proper task for this.

Keep coding,
Dawid


Danny3445 pro premium priority commented 3 years ago

Hey Dawid,1. I know about this option, but i would like to have a keyup on a input field dynamicly created inside the modal. Maybe a option for the colums to add custom elements. (class, id, js elements). I made it already working with a workaround, but it would be more nice to add it in the tableeditor options: table.addEventListener('edit.mdb.tableEditor', (e) => { setTimeout(function (){ document.querySelector('div[data-mdb-field="adress"] input').addEventListener("keyup", getAddress); }, 0);})2. This width option doesnt work for the modal, like I said in step 1, when we can add classes, we can create col's. And also, there is already a option "editable", maybe you can make also a option "removable", to totally delete the remove button.


Dawid Wajszczuk staff commented 3 years ago

Hi. Thanks for your feedback. A proper task has been added and we will discuss this in our team.


Danny pro premium priority answered 3 years ago

Two more things:

  1. If I assigned text via javascript with .value, it will not be stored in the row value. I really need to fix this, because I made something to add the address automaticly. See the bug in video here: https://vimeo.com/670871284
  2. Pretty much the same as above, how do I add/edit value to the row itself? For example, if I added a row, how do I add the assigned ID to e.row.id?

There is still so much to improve on this. Hopefully you have a solution.


Dawid Wajszczuk staff commented 3 years ago

Can you share a piece of code responsible for changing these values?


Danny pro premium priority commented 3 years ago

document.querySelector('div[data-mdb-field="city"] input').value = city; document.querySelector('div[data-mdb-field="city"] input').classList.add("active");


Dawid Wajszczuk staff commented 3 years ago

Unfortunately it is not possible to do those things.


Danny pro premium priority commented 3 years ago

Really? It’s one of the basic things, the table editor is so useless, you can’t do anything by yourself because it’s so limited. I’m wondering why I still have mdbpro for such an expensive price and just getting some easy, really easy, limited stuff.


Sebastian Kaczmarek staff pro premium commented 3 years ago

@Danny, features you described are quite custom and above the scope of the current Table Editor plugin. However, we'll try to help you with this. We've sent you a message on an email address provided in your account settings. Please check your spam folder if you cannot see it.


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.10.2
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No