I am trying to get the key value associated with user selection on a list in dataList -- the data in dataList is populated through a container and composed through react-komposer.
In the parent component,
In the container .js file,
import {composeWithTracker} from 'react-komposer';
import OrgNamesDataList from '/client/components/OrgNamesDataList.jsx';
composer = (props, onData) => {
console.log("inside container composer outside -- " + props.orgName);
```
console.log("inside container composer");
const handle = Meteor.subscribe(...);
if (handle.ready()) {
const orgNames = orgs.find().fetch();
onData(null, {orgNames});
}
```
};
export default composeWithTracker(composer)(OrgNamesDataList);
In OrgNamesDataList.jsx,
import React from 'react';
const DataItem = ({dataObj}) =>(
);
const OrgNamesDataList = ({orgNames}) =>(
);
export default OrgNamesDataList;
---
The above code is working -- but, I don't know how I can use the callback function on props to get the key associated with the value rendered through the container. Could you help please?
I am trying to get the key value associated with user selection on a list in dataList -- the data in dataList is populated through a container and composed through react-komposer.
In the parent component,