CancelCommandDirective
Represents the cancel command button directive of the Kendo UI ListView for Angular.
Provides the cancel command of the ListView. You can apply this directive to any button
element inside a EditTemplateDirective template.
When you click an associated button with the directive, the
cancel event
triggers (see example).
Definition
Package:@progress/kendo-angular-listview
Selector:[kendoListViewCancelCommand]
Syntax:
<kendo-listview>
<ng-template kendoListViewEditTemplate>
<button kendoListViewCancelCommand>Cancel changes</button>
</ng-template>
</kendo-listview>
You can control the content of the button based on the state of the item.
<kendo-listview>
<ng-template kendoListViewEditTemplate let-isNew="isNew">
<button kendoListViewCancelCommand>{{isNew ? 'Discard' : 'Cancel changes'}}</button>
</ng-template>
</kendo-listview>
Inputs
disabled
boolean
When true, disables the Button and prevents user interaction.
false
fillMode
ButtonFillMode
Sets the background and border styles of the Button. See Button Appearance. The default value is set by the Kendo theme.
icon
string
Sets the name of an existing font icon in the Kendo UI theme.
iconClass
string
Defines a CSS class, or multiple classes separated by spaces applied to a span element inside the Button. Use the iconClass to add custom icons.
imageUrl
string
Specifies a URL for an img element inside the Button.
The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
rounded
ButtonRounded
Sets the border radius of the Button. See Button Appearance. The default value is set by the Kendo theme.
selected
boolean
Sets the selected state of the Button.
Use with the toggleable property.
false
size
ButtonSize
Sets the padding of the Button. See Button Appearance. The default value is set by the Kendo theme.
svgIcon
SVGIcon
Sets an SVG icon to display inside the Button.
themeColor
ButtonThemeColor
Sets a predefined theme color for the Button. The theme color applies as a background and border color and adjusts the text color. See Button Appearance. The default value is set by the Kendo theme.
toggleable
boolean
Adds visual styling to indicate when the Button is active.
false
Events
click
EventEmitter<any>
Fires when the user clicks the Button.
Fires when the selected state of a toggleable button changes.
The event argument is the new selected state (boolean).