Comments (6)
No, it is weird that i tried almost everything but not works for this. I also tried to use old version of this function but still the same behavior. I guess this is another bug. @melloware
from primereact.
cc @Rekl0w
from primereact.
it probably needs to be ObjectUtils.isNotEmpty(props.optionValue)
from primereact.
The case where I tested was for the one with the 'value' key set. Maybe the isNotEmpty should check the output of resolveFieldData?
const getOptionValue = (option) => {
if (props.optionValue) {
return ObjectUtils.resolveFieldData(option, props.optionValue);
} else {
const optionValue = ObjectUtils.resolveFieldData(option, "value");
return ObjectUtils.isNotEmpty(optionValue) ? optionValue : option;
}
};
Edit:
Or maybe use
const getOptionValue = (option) => {
if (props.optionValue) {
return ObjectUtils.resolveFieldData(option, props.optionValue);
} else {
return option.hasOwnProperty("value") ? ObjectUtils.resolveFieldData(option, "value") : option;
}
};
from primereact.
Both codes causes the blank dropdown options.
If you try the old codes before i've changed, it behaves the same. Like i said i don't think that code causes this bug.
from primereact.
Ok. I'll test some more tomorrow
from primereact.
Related Issues (20)
- Datatable Cell edit manipulates data (not pure)
- Menubar: No access for content using pt props. HOT 1
- Data Not Rendered in PrimeReact editor component HOT 2
- ListBox: focusable using keyboard only once HOT 1
- TreeTable: Screenreader cannot read rows as expected
- Calendar: Add Clear "X" button to input field HOT 5
- Calendar: crash when using props "viewDate" and "onSelect" HOT 1
- TreeSelect filter performance too slow when user is typing HOT 5
- TreeSelect: Can't use 'space' character in filter input HOT 2
- Cannot use Checkbox as an uncontrolled component
- Stepper: Inactive steps removed from DOM HOT 6
- MenuBar: App crashing due to missing translation HOT 2
- DataTable: Grouping rows generate repeated groups
- Stepper: Unstyled mode preview HOT 1
- InputNumber: Incorrect default value for minFractionDigits when set to null
- Toast: Becomes unstyled on mouse hover
- InputOtp: Type not Working with Sample Template HOT 1
- Tree: Dragging tree nodes that do not have a dragdropScope explicitly set cause lowercase conversion for checks to fail. HOT 1
- DataTable: Subheader row group with sorting
- A TypeError is encountered when attempting to collapse any row after using the “Expand All” button in a table with expanded rows and row group mode
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 primereact.