Multistate representation - TriStateCheckbox

PrimeNG goes beyond the normal checkbox behavior of the "true/false" selection on the web. In some cases, there is a need for a "true/false/null" combination, especially to represent the status of any entity. Remember that the model property is assigned to any type instead of a boolean type. A basic example of a TriStateCheckbox used to enter the feedback for Angular 4 would be as follows:

<p-triStateCheckbox name="tristate" [(ngModel)]="status">
</
p-triStateCheckbox>

TriStateCheckbox will be displayed with three different states (excellent, good, and bad) as shown in the following screenshot:

This enhanced checkbox also provides the onChange event callback for any user interactions. The user actions are disabled through the disabled property, just like the normal boolean checkbox.

The complete demo application with instructions is available on GitHub at
https://github.com/ova2/angular-development-with-primeng/tree/master/chapter3/checkbox.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.65.130