Skip to content
Snippets Groups Projects
Commit 21db53c1 authored by Maximilian Giller's avatar Maximilian Giller
Browse files

Added function documentation

parent 70f59ba7
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56562 passed
......@@ -24,12 +24,20 @@ export class SpaceSelect extends React.Component<propTypes, stateTypes> {
listAllSpaces().then(this.updateSpaceList);
}
/**
* Render list of spaces as available options.
* @param spaceList Array containing all available space names.
*/
updateSpaceList(spaceList: string[]) {
this.setState({
spaces: spaceList,
});
}
/**
* Triggered when another option (space) is selected. Calls given function to load specified space.
* @param e Select-event that references the select element and allows to access the new value (space).
*/
handleSelectChange(e: ChangeEvent<HTMLSelectElement>) {
const success = this.props.onLoadSpace(e.target.value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment