Closed Khosiyat closed 3 months ago
@Khosiyat no, this is not a proper solution. What needs to be done is that when the dataset in visualisation page is selected, sensors are loaded from the API object for that dataset. Basically, chage needs to be done in SensorList.tsx by changing API call for the dataset detail call (so it is the same as in in dataset detal page) and instead of doing all the complicate dlogic in the useEffect in SensorList.tsx of traversing all events, the sensorTypes are directly taken from the dataset detail object.
@zrohacova, thanks for the guidance :) I passed selectedDataset as a prop to the component and then utilized useEffect hook to fetch sensor data whenever the selectedDataset prop changes. Do you think it is the right way to achieve the requirement?
@Khosiyat Yeah,I think that should be correct. Just please, delete the changes you did before that are not relevant for the PR now, so added fields from dataset object and LineGraph changes
Fetching data from
Dataset
object. The previous was fetchingRecord
object.Slack Link