IgniteUI / igniteui-webcomponents

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
https://www.infragistics.com/products/ignite-ui-web-components
Other
113 stars 2 forks source link

[Bug]: igc-radio-group initial state not set #1235

Closed valeriatoneva closed 3 weeks ago

valeriatoneva commented 3 weeks ago

Which component(s) are affected?

Radio & Radio Group

Description

The radio group doesn't have an initial state just like the rating component has, slider, input group etc.

This means that on refresh we do not have a selected radio button. By default the first one should be selected.

image

Reproduction

  1. Go to https://igniteui.github.io/igniteui-webcomponents/?path=/story/radiogroup--basic
  2. Observe that there is no initial value (no button selected by default)

Workaround

The first button should be selected.

Is this a regression?

No or unsure. This never worker, or I haven't tried before.

Affected versions

4.8.0

Browser/OS/Node environment

Browser: Chrome

rkaraivanov commented 3 weeks ago

The radio group serves as a layout container for radio buttons and does not affect the state of its child elements. Furthermore, igc-radios and standard browser radio inputs are not "checked" by default. To set an initial state, add a checked attribute to one of the group's elements either during the initial page load or in response to another state change.

If this is related to #315 then it should be addressed there.