Migration Guide for nv-fieldradio
In the latest version of the nv-fieldradio component, we've made several important changes to the properties to improve usability and consistency. Below is a guide to help you update your existing components from version 2 to version 3.
Deprecations#
1. prop message -> description#
The message property has been renamed to description. This new name better describes the property's functionality, which allows the radio button to be clearer and more informative.
Old Usage:
<NvFieldradio Message="Description of the radio button"></NvFieldradio>
New Usage:
<NvFieldradio Description="Description of the radio button"></NvFieldradio>
2. prop labelBefore -> labelPlacement#
The labelBefore property has been renamed to labelPlacement. This new name better describes the property's functionality, which allows the radio button to be clearer and more informative.
Old Usage:
<NvFieldradio LabelBefore="true"></NvFieldradio>
New Usage:
<NvFieldradio LabelPlacement="NvFieldradio.LabelPlacementEnum.before"></NvFieldradio>
<NvFieldradio LabelPlacement="NvFieldradio.LabelPlacementEnum.after"></NvFieldradio>
Breaking Changes#
1. prop labelBeforeWidth -> removed#
The labelBeforeWidth property has been removed. Use css styles instead.
2. prop validation -> removed#
The validation property has been removed. Use the error property together with errorDescription instead.
Old Usage:
<NvFieldradio Validation="Validation message"></NvFieldradio>
New Usage:
<NvFieldradio Error="true" ErrorDescription="Validation message"></NvFieldradio>
3. event change -> checkedChanged#
The change event has been renamed to checkedChanged.
Old Usage:
<NvFieldradio Change="handleChange"></NvFieldradio>
New Usage:
<NvFieldradio CheckedChanged="handleCheckedChanged"></NvFieldradio>