You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Severin Ibarluzea edited this page Aug 25, 2020
·
3 revisions
First, install the universal-data-tool to your react project.
npm install universal-data-tool
Now import the UniversalDataViewer component...
importReactfrom"react"importUniversalDataViewerfrom"universal-data-tool/components/UniversalDataViewer"exportdefault()=>(<UniversalDataViewerhideHeader// optional default: false (show header)// oha is where you put your UDT formatted object// Read more about this format here:// https://github.com/UniversalDataTool/udt-formatdataset={{interface: {type: "..."},samples: [/* ... */],// ...}}onExit={(action: "go-to-prev"|"go-to-next"|undefined)=>{// Called when user hits "Save", "Next", or "Prev"}}// when data is saved this is calledonModifySample={(sampleIndex,newSampleData)=>{// do something}}/>)