What’s new in PrimeNG 4.2 release

After two months, PrimeNG released 4.2 version with some new features and around 200 defect fixes. The notable features are rewrites for Terminal using service, Message service for Growl and messages, button bar(Today and Clear buttons) and date template for Calendar component, item template for MultiSelect, loading indicator for DataTable and autoComplete components and floating feature for input components and so on.

Some of the major features are as follows,

Floating Labels for Inputs:

The floating labels for input components has nice user experience and it is available previous releases through Ultima and Barcelona templates. The team decided to include this feature in PrimeNG core itself by wrapping the input and the label inside a container with .ui-float-label class.

For example, the username placeholder float and forms a label on input focus  as below

Button bar and date template for Calendar:

Calendar component provided Today and Clear buttons on its panel using showButtonBar property. This feature enables to select the current date and clear the Calendar date using Clear button.

It also provides style class properties for today and clear buttons using todayButtonStyleClass and clearButtonStyleClass classes.

The previous Calendar has no features to highlight the particular dates in calendar. The newly added date template provides customized dates, for example, the background of dates between 10th and 21st of each month highlighted as follow,

MessageService for Growl and messages:

The MessageService implementation allows to create a single instance of Growl for an entire application instead of creating one for each component. We just need to import the class and add it under provider to make sure inherited by all of it’s descendent components.

The multiple messages are added using the service,

Whereas message component doesn’t need to bind array of messages if you opt for MessageService.

Template for MultiSelect:

The item template allows to display customized view of suggestions using ng-template.

Conclusion: PrimeNG 4.2 release provided more features to make the developer more convenient to use the library. It also included some refactors to improve the quality and ease of use. Even though, the release doesn’t include any new components, the next release planned with ScrollPanel, KeyFilter and InputNumber components along with accessibility and defect fixes.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *