@tcn/ui-navigation
v0.0.5
Published
TCN Navigation Components
Downloads
270
Keywords
Readme
navigation
data navigator
When the user have a custom view on the entity we will call the render function and pass the navigatorPresenter into that render method. This will allow the nesting of complex data structures.
- Support lazy loaded options
- Support lazy loaded lists
- Support lazy loaded objects
- Support embedded objects
<DataNavigator presenter={new DataNavigatorPresenter({
type: "list",
load(request: PageRequest): Promise<PageResponse>,
actions: [{
isGlobal: true,
name: "add",
title: "Add",
execute:(GlobalTableAction): Promise<ActionResponse>
},{
isBulk: true,
canAct: ()=>boolean,
name: "delete",
title: "Delete",
execute:(BulkTableAction): Promise<ActionResponse>
},{
name: "update",
title: "Update",
execute:(TableAction): Promise<ActionResponse>
}],
properties: [{
type: "inline-custom-view"
},{
type: "string",
name: "name",
title: "Name",
readonly: true,
required: true,
},{
type: "date",
name: "dateOfBirth",
title: "Date Of Birth",
readonlyAfterCreate: true,
validate: ()=>{}
},{
type: "link",
name: "permissions",
title: "Permissions",
load: (request: LinkRequest)=> Promise<LinkResponse>;
},{
type: "links",
name: "permissions",
title: "Permissions",
load: (request: LinksRequest)=> Promise<LinksResponse>;
},{
type: "object",
name: "role",
title: "Role",
load: (request: ItemRequest)=>Promise<ItemResponse>,
properties: [{
type: "options",
name: "name",
title: "Name"
options: [{title: "Janitor", value: "janitor"}],
// loadOptions(){}
},{
type: "date",
name: "startDate",l
title: "Start Date"
}],
// load(),
// If the load method is not here we assume an embedded object.
save(){}
validate(){}
}],
validate(){}
})}>