eclipsesource / eclipsesource/tabris-js

RadioButton behaves like a checkbox when it's attached to Cell/ListView

Open
#2,102 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

### Problem description

According to the docs, `Cell` could be a parent component of [RadioButton](https://docs.tabris.com/latest/api/RadioButton.html#class-radiobutton). But, when it's attached to the `Cell` it behaves like a checkbox, previously selected RadioButtons are still checked when another one is selected.

### Expected behavior

Only one RadioButton can be selected at a time.

### Environment

- Tabris.js version: 3.6
- Device: iPad Pro 3rd gen and Pixel 3
- OS: iOS 13.6 and Android 10

### Code snippet

```jsx
import { contentView, Stack, RadioButton, TextView } from 'tabris';
import { ListView, Cell } from 'tabris-decorators';

const ITEM_HEIGHT = 36;
const options = [
{ label: 'foo' },
{ label: 'bar' },
{ label: 'baz' }
];
const title = 'Example text';

contentView.append(








);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.