Selectable enforces consistent use of the selected state across components.
import { DaffSelectableDirective } from '@daffodil/design'
Enforces consistent use of the selected state.
@Directive()
class DaffSelectableDirective implements DaffSelectable {
@Input() selected: boolean = false
@Output() becameSelected: EventEmitter<void> = new EventEmitter<void>()
select(): this
deselect(): this
}
boolean| Default | false |
|---|---|
| Description | Whether the component is selected. |
EventEmitter<void>| Default | – |
|---|---|
| Description | An event that fires after the component becomes selected. |
thisSelects the component and emits the becameSelected event.
thisDeselects the component.
import { DaffSelectable } from '@daffodil/design'
An interface for giving a component the ability to display a selected UI. In order to be selectable, the class must implement this property.
interface DaffSelectable {
selected: boolean
}