okfn / opendataeditor

No-code application to explore and publish all kinds of data: datasets, tables, charts, maps, stories, and more. Forever free and open source project powered by open standards and generative AI.
http://opendataeditor.okfn.org
MIT License
149 stars 18 forks source link

Add backspace on key functionality for deleting of multiple cells #408

Closed guergana closed 3 weeks ago

guergana commented 1 month ago
cloudflare-pages[bot] commented 1 month ago

Deploying opendataeditor with  Cloudflare Pages  Cloudflare Pages

Latest commit: 379b3ba
Status: ✅  Deploy successful!
Preview URL: https://93719a6b.opendataeditor.pages.dev
Branch Preview URL: https://350-add-backspace-key-to-fil.opendataeditor.pages.dev

View logs

romicolman commented 4 weeks ago

@guergana I have just tested it and it's not working on Mac

roll commented 3 weeks ago

@guergana https://github.com/okfn/opendataeditor/blob/main/client/components/Parts/Bars/Menu.tsx#L21

guergana commented 3 weeks ago

@guergana https://github.com/okfn/opendataeditor/blob/main/client/components/Parts/Bars/Menu.tsx#L21

Hi, thanks @roll could you provide some context? Why would this be better than capturing the native event?

roll commented 3 weeks ago

@guergana Because the library probably covers the differences in native keyboard codes, although not sure about it

Generally speaking, I think it's better to use the lib that abstracts it (if it's already in-use in the project)

guergana commented 3 weeks ago

@guergana Because the library probably covers the differences in native keyboard codes, although not sure about it

Generally speaking, I think it's better to use the lib that abstracts it (if it's already in-use in the project)

@roll According to the mozilla Javascript docs, it should work as it is now, using the event.key for both Mac and Windows. We should test this together on your Mac @romicolman