Comments (5)
Hi guys! Thank you for reporting this issue.
In the current implementation of the Dropdown Cell, the user has to keep the state of the dropdown on his own.
The cell expects to receive isOpen
property within the cell, like this:
{
type: "dropdown",
selectedValue: person.name,
inputValue: person.name,
isOpen: true /* or false */,
values: getPeople().map((p) => ({ label: p.name, value: p.name }))
},
I can see that it's not described in the docs, so thank you again for pointing this out.
If this behavior doesn't meet your needs, you can always create and use your own dropdown cell.
from reactgrid.
@czerwiukk Thank you! For those that need an example of what the suggestion is, here is my sandbox.
Look for the comments that say // CHANGED:
because those lines are the important parts
https://codesandbox.io/s/silevis-reactgrid-working-dropdown-example-ow9j2c?file=/src/App.tsx
from reactgrid.
I am having this problem too.
Here is a sandbox that shows the issue
https://codesandbox.io/s/jolly-galileo-jivsd2?file=/src/App.tsx
from reactgrid.
Here is another example that doesn't modify the person interace. Instead, we hold a dropbox opened location state with useState and set it when something opens.
https://codesandbox.io/s/silevis-reactgrid-better-generic-dropdown-ue7wph?file=/src/App.tsx
from reactgrid.
Why is this not a part of the default behaviour of the DropdownCell?
from reactgrid.
Related Issues (20)
- May I ask if there is a bus schedule for the release of the version, if there is, the user does not need to ask when it will be released HOT 4
- When the last line is bottomed, the right-click context menu is also bottomed, and the menu item is covered and cannot be selected HOT 2
- Question/Feature request - Update state on keyDown HOT 1
- When supporting the need for double check, a carriage return is required in a single text cell and onCellsChanged is triggered, changes become an array of one element, but a two-element array HOT 8
- Does not insert data correctly from Excel into Windows HOT 6
- checkbox cannot auto-fill HOT 4
- Working Example of MultiUsers HOT 1
- Working example for budget planner HOT 1
- The v5-dev branch failed to start HOT 2
- bug: Column resize handle is unclickable in last column [V4, Firefox]
- Collapsible/expandable nonEditable chevronCell HOT 1
- onCellsChanged typeerror following "Handling Data Changes" HOT 2
- Is there a way to create new rows onCellClick? HOT 3
- Is there a possibility to set selection ? HOT 6
- onBeforeAutofill HOT 1
- Performance optimization: The number of table rows reaches more than 5000, even if virtual scrolling is turned on, editing and updating cells is still very slow HOT 2
- moveDownOnEnter onCellsChanged is triggered twice
- Automatically adjust column width
- Chevron unfolding produces blank table portion until further interaction HOT 1
- Native select will not remain open HOT 3
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.