Giter Club home page Giter Club logo

Comments (5)

crivadavi avatar crivadavi commented on August 15, 2024 1

With the method

editable.load({"metadata": metadata, "data": data});

you are redrawing the table with the object "data" you put in. Are you sure that the variable data contains the updated values of the row you have modified?
Check that value, or another solution could be to call method "refreshGrid". So, after you have appended a new row write only:

editable.refreshGrid()

from editablegrid.

crivadavi avatar crivadavi commented on August 15, 2024

What do you mean by append a row? In which context? Can you post a sample code of what you are trying to do?

from editablegrid.

Nonononoki avatar Nonononoki commented on August 15, 2024

@crivadavi

Example code:

var editable = new EditableGrid("editable_id");
editable.append(2, {"selected": false, "name": "", "btn":`<button class="btn" onClick="openModal(this)" id=${maxId_creator}><i class="fa fa-edit"></i></button>`});

Set a value or id for the html button:

function openModal(button) {
button.id = "button.id";
}

from editablegrid.

crivadavi avatar crivadavi commented on August 15, 2024

Did you do something on events "tableRendered" or "tableFiltered" that could cause a redraw of the table, resetting all the buttons?

from editablegrid.

Nonononoki avatar Nonononoki commented on August 15, 2024

I actually do I think. I use these functions afterwards:

editable.load({"metadata": metadata "data": data});
editable.renderGrid(...);

But why are only the buttons resetted but boolean, integer and string cells unaffected? And what would be the alternative? Because I want the table to show newly added rows.

from editablegrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.