Skip to content

Commit

Permalink
Merge v2.5.1
Browse files Browse the repository at this point in the history

 - `bones_ui_web`:
   - `setValue`: Update handling of `CheckboxInputElement`.
  • Loading branch information
gmpassos authored Feb 28, 2024
2 parents e98c6c2 + ef650e9 commit 3672de5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.5.1

- `bones_ui_web`:
- `setValue`: Update handling of `CheckboxInputElement`.

## 2.5.0

- sdk: '>=3.3.0 <4.0.0'
Expand Down
2 changes: 1 addition & 1 deletion lib/src/bones_ui.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class BonesUI {
static const String version = '2.5.0';
static const String version = '2.5.1';
}
6 changes: 5 additions & 1 deletion lib/src/bones_ui_web.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:html' as web;
import 'package:dom_tools/dom_tools.dart';
import 'package:swiss_knife/swiss_knife.dart';

typedef UIElement = web.Element;
typedef UINode = web.Node;
Expand Down Expand Up @@ -40,7 +41,10 @@ extension UIElementExtension on UIElement {
void setValue(String? value) {
final element = this;

if (element is web.InputElement) {
if (element is web.CheckboxInputElement) {
var checked = parseBool(value) ?? false;
element.checked = checked;
} else if (element is web.InputElement) {
element.value = value;
} else {
element.text = value;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: bones_ui
description: Bones_UI - An intuitive and user-friendly Web User Interface framework for Dart.
version: 2.5.0
version: 2.5.1
homepage: https://github.com/Colossus-Services/bones_ui

environment:
Expand Down

0 comments on commit 3672de5

Please sign in to comment.