Git Product home page Git Product logo

Comments (9)

nihgwu avatar nihgwu commented on July 17, 2024

the source code for action: const action = message => args => console.log(message, args), it returns a callback actually, so you should use it in this way

const rowEventHandlers = {
    onClick: ({ rowData, rowIndex, rowKey, event }) => console.log('clicked'),
    
  }
...
<BaseTable ... rowEventHandlers={rowEventHandlers} />

from react-base-table.

x4080 avatar x4080 commented on July 17, 2024

Thanks @nihgwu

from react-base-table.

x4080 avatar x4080 commented on July 17, 2024

Oh, I didnt know if there's example folder inside the git, no wonder I feel at lost :)

Thanks again

from react-base-table.

nihgwu avatar nihgwu commented on July 17, 2024

You are welcome 😄

from react-base-table.

x4080 avatar x4080 commented on July 17, 2024

@nihgwu Is it possible to get the column that clicked using this roweventhandlers ? Or there's another event handler to use ?

TIA

from react-base-table.

nihgwu avatar nihgwu commented on July 17, 2024

for cells you can just add event listeners on your cell element, like cellRenderer = () => <div onClick={} />, or there is an advanced prop cellProps to attach listeners on cell's root element

from react-base-table.

x4080 avatar x4080 commented on July 17, 2024

Yes, I already do that, I hope there's already some feature in it :)

Thanks again

from react-base-table.

kaleem-elahi avatar kaleem-elahi commented on July 17, 2024

I have RowHandler to call a function onClick of row and also a menu popup in cell to open menu on click... now what happens when i click on menuPopover in cell, RowHandler events are fired, I don't know where i have to add Stoppropaate to stop propagation or is there a different way to handle this ?

from react-base-table.

nihgwu avatar nihgwu commented on July 17, 2024

@kaleem-elahi that's how React Portal work, it will propagate events to it's host(there is a long discussion on this behaviour) , so you need to stopPropagation in your popover

from react-base-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.