Having trouble getting help?
Contact Support
Contact Support
Disable a dropdownbutton in Angular Drop down button component
27 Apr 20242 minutes to read
DropdownButton component can be enabled/disabled by giving disabled
property.
To disable DropdownButton component, the disabled property can be set as true
.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { DropDownButtonModule } from '@syncfusion/ej2-angular-splitbuttons'
import { enableRipple } from '@syncfusion/ej2-base'
import { Component } from '@angular/core';
import { ItemModel } from '@syncfusion/ej2-angular-splitbuttons';
@Component({
imports: [
DropDownButtonModule
],
standalone: true,
selector: 'app-root',
template: `<div class="e-section-control">
<!-- To render DropDownButton. -->
<button ejs-dropdownbutton [items]='items' content='Message' iconCss='ddb-icons e-message' disabled='true'></button>
</div>`
})
export class AppComponent {
// Initialize action items.
public items: ItemModel[] = [
{
text: 'Edit'
},
{
text: 'Delete'
},
{
text: 'Mark as Read'
},
{
text: 'Like Message'
}];
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));