neolution-ch / javascript-utils

0 stars 3 forks source link

Add LabelValueOption interface and utility methods #11

Open drebrez opened 1 year ago

drebrez commented 1 year ago

A LabelValueOption interface that represent a select option gives the possibility to have some useful utility functions like:

see example: https://github.com/neolution-ch/react-hook-form-components/blob/main/src/lib/types/LabelValueOption.ts

This might be seen as the javascript version of the SelectListItem (https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.rendering.selectlistitem?view=aspnetcore-8.0) class of the ASP.NET Core. Maybe we should name it the same