Coder Social home page Coder Social logo

Disabling a row about iron-data-table HOT 7 OPEN

saulis avatar saulis commented on August 23, 2024
Disabling a row

from iron-data-table.

Comments (7)

Saulis avatar Saulis commented on August 23, 2024

Hi!

What do you mean by disabling? Preventing selection/expanding when clicking? There isn't any configuration for that, but if you want to achieve that, you can manually add a tap event listener for each data-table-row elements and call e.stopPropagation() in the listener to prevent selection.

from iron-data-table.

rosepriya-jk avatar rosepriya-jk commented on August 23, 2024

Yeah, selection/expansion should be prevented and the disabled row should have some custom css like a change in text color and background color.Just like the [selected] config. Is it ok if I add that as a feature in grid?

from iron-data-table.

Saulis avatar Saulis commented on August 23, 2024

What kind of API were you thinking of? How would the user define which rows to disable?

from iron-data-table.

rosepriya-jk avatar rosepriya-jk commented on August 23, 2024

thought of having a 'disabled' config just like selected and expanded

from iron-data-table.

Saulis avatar Saulis commented on August 23, 2024

OK, the values of selected and expanded get toggled between true / false on user click actions,
... so how the disabled would be set to true ?

from iron-data-table.

Saulis avatar Saulis commented on August 23, 2024

How about if <data-table-row disabled> would prevent any selection and row expanding from happening, and the user would then do:

  table.beforeRowBind = function(data, row) {
    row.disabled = data.foo === 'bar';
  }

from iron-data-table.

Saulis avatar Saulis commented on August 23, 2024

@tinkerd any thoughts on this?

from iron-data-table.

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.