-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add public API for adding sections (#44)
* Add public API for adding sections * Re-render when a new section is added
- Loading branch information
1 parent
e5c8e9f
commit 8f92d12
Showing
4 changed files
with
147 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { INewLauncher, ISectionOptions } from './types'; | ||
import { ISignal, Signal } from '@lumino/signaling'; | ||
import { LauncherModel } from '@jupyterlab/launcher'; | ||
|
||
export class NewModel extends LauncherModel implements INewLauncher { | ||
sections: ISectionOptions[] = []; | ||
addSection(options: ISectionOptions) { | ||
this.sections.push(options); | ||
this._sectionAdded.emit(); | ||
} | ||
get sectionAdded(): ISignal<NewModel, void> { | ||
return this._sectionAdded; | ||
} | ||
private _sectionAdded = new Signal<NewModel, void>(this); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters