default selection is now none
This commit is contained in:
@@ -31,7 +31,7 @@ export default class CardList extends StatefulVue {
|
||||
|
||||
public async mounted() {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
this.setCategories(state.categories);
|
||||
this.setCategories(state.app.categories);
|
||||
}
|
||||
|
||||
public onSelected(categoryId: number, isExpanded: boolean) {
|
||||
|
||||
@@ -55,7 +55,7 @@ export default class CardListItem extends StatefulVue {
|
||||
|
||||
private async getCardTitleAsync(categoryId: number): Promise<string | undefined> {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
const category = state.getCategory(this.categoryId);
|
||||
const category = state.app.findCategory(this.categoryId);
|
||||
return category ? category.name : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { INode } from './../SelectableTree/INode';
|
||||
|
||||
export class ScriptNodeParser {
|
||||
public static parseNodes(categoryId: number, state: IApplicationState): INode[] | undefined {
|
||||
const category = state.getCategory(categoryId);
|
||||
const category = state.app.findCategory(categoryId);
|
||||
if (!category) {
|
||||
throw new Error(`Category with id ${categoryId} does not exist`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user