Code Monkey home page Code Monkey logo

Comments (6)

iddan avatar iddan commented on May 22, 2024

Hey @emacsbliss there is a story that does just that https://github.com/iddan/react-spreadsheet/blob/master/src/stories/Spreadsheet.stories.tsx#L23

from react-spreadsheet.

emacsbliss avatar emacsbliss commented on May 22, 2024

thanks a lot, I'm not familiar with typescript.
From the example, I think it's triggered via button click..

wonder is it possible to achieve that via context menu(right mouse click) on a particular
row or column so that information is already known based on event?

from react-spreadsheet.

iddan avatar iddan commented on May 22, 2024

Yes, you only need to delete the cells from the data and the component will reflect that.

from react-spreadsheet.

emacsbliss avatar emacsbliss commented on May 22, 2024

I guess I mainly look for how to make the component handle context menu event so it knows which row/column the right click happened which then can pass to callback?

from react-spreadsheet.

iddan avatar iddan commented on May 22, 2024

Oh.. you can use https://github.com/vkbansal/react-contextmenu. It can be integrated into this library as well.

from react-spreadsheet.

emacsbliss avatar emacsbliss commented on May 22, 2024

thanks!
but I felt it's not possible to integrate react-contextmenu into this library, maybe I missed something..

my issue is so far seems I can only change DataViewer for the cell, but upon rendering, whatever element I returned from my custom DataViewer(which is the place I hook into react-contextmenu) is the inner children of a td element and that seems never trigger the context menu..

any help would be greatly appreciated!

from react-spreadsheet.

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.