Comments (6)
@icyhot12 What is this application scenario? Can it not be solved through the custom menu of the business side?
from reactgrid.
What do you mean by that "Can it not be solved through the custom menu of the business side?" ??
I have react app with react-grid implementation, and some users don't want to use enableRowSelection functionality because they can't select only first cell of any row (because with this prop enabled it is selecting whole row) so I am trying to add this functionality from right click context menu as you can see on the screenshot:
And it is almost working because the row is selected, but now I have problem when trying to copy the row to clipboard, when pressing cmd + C - nothing is copied, clipboard is empty.
Any ideas ?
I am setting selection of the row with reference to ReactGrid component, sth like that:
spreadSheetRef.current.spreadSheet.current.updateState(state => ({ ...state, selectionMode: "row", selectedIds: [pointetRowId] }))
Row is selected properly, but nothing is copied to clipboard.
edit: I think that this could be a problem with wrong focus after clicking option from context menu
from reactgrid.
I can't recreate your issue. Are you using v4.1.3?
from reactgrid.
I was using v4.0.5 but right now I raised version to v4.1.3 and the problem is still occurring.
What is your method for setting selection to whole row from right context menu ?
Can you show it ?
from reactgrid.
To be honest I'm a bit surprised that you've managed to update state using the reference to ReactGrid, but anyways: if you want to select row then according to selectOneRow
from selectRange.ts
you'd need to update both the selectedIds
and selectedIndexes
. Could you try that?
from reactgrid.
When I was dealing with other problem I figured it out that it was problem with wrong value for document.activeElement after clicking on my new option from context menu.
Right now it is working correctly, I am updating the state with
spreadSheetRef.current.updateState(state => ({ ...state, selectionMode: "row", selectedIds: [pointetRowId], selectedIndexes: [rowIndex], }))
but after that the key thing was to set focus to .rg-hidden-element
......
from reactgrid.
Related Issues (20)
- onSelectionChanged unusable with Typescript as Range and Location are not exported by package
- Discord invite link in social links is invalid HOT 1
- Event Handler assumes id is truthy HOT 3
- CSS Selector on input overrides material ui styles HOT 2
- How to put calculations on rows and columns? HOT 7
- Fill handle does not work on dropdown cells HOT 3
- source code for budget-planner is not available HOT 1
- Chevron cell onCellChanged not triggered when ChevronCell is nonEditable HOT 4
- copy -> paste - incorrect inserted values into NumberCell HOT 7
- How to make the Dropdown Searchble? HOT 3
- negative values are not pasted as negative HOT 1
- How to actively manage cell blurring? HOT 13
- Selector [contenteditable] is not pure. Issue with importing scss file HOT 11
- current version visible on website
- Copy-pasting cells with white text - invisible output HOT 1
- Number Cell does not support input in an Intl format HOT 7
- When you edit the cell and scroll, cell is scrolling with you HOT 2
- What is the plan for V5? I want to contribute code to V5 HOT 4
- onCellsChanged not triggering on fillHandle with Dropdown cell HOT 2
- React Testing Library user events doesn't work on Table HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactgrid.