feat(measurements): Provide for the Load (SR) measurements button to optionally clear existing measurements prior to loading the SR. (#4586)
This commit is contained in:
1 parent
7eec015ff1
commit
4d3d5e794c
15 files changed
+185
-128
No files matched your search
+8
@@ -272,6 +272,14 @@ function TrackedMeasurementsContextProvider(
|
||||
viewports,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
// The command needs to be bound to the context's sendTrackedMeasurementsEvent
|
||||
// so the command has to be registered in a React component.
|
||||
commandsManager.registerCommand('DEFAULT', 'loadTrackedSRMeasurements', {
|
||||
commandFn: props => sendTrackedMeasurementsEvent('HYDRATE_SR', props),
|
||||
});
|
||||
}, [commandsManager, sendTrackedMeasurementsEvent]);
|
||||
|
||||
return (
|
||||
<TrackedMeasurementsContext.Provider
|
||||
value={[trackedMeasurements, sendTrackedMeasurementsEvent]}
|
||||
|
||||
Reference in new issue
Block a user