Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

## 87.0.0-SNAPSHOT - unreleased


### 🎁 New Features

* `CodeInput` / `JsonInput` now auto-format content for display via their configured `formatter`,
Expand All @@ -27,6 +26,7 @@
focused and committed (full-precision) value.
* Fixed inline grid editing not ending when clicking empty grid space to the right of the last
column or below the last row - such clicks now commit the active edit.
* `CheckboxButton` no longer leaks `HoistInputProps` into underlying HTML `<button>` element.

### ⚙️ Typescript API Adjustments

Expand Down
22 changes: 21 additions & 1 deletion desktop/cmp/input/CheckboxButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,27 @@ class CheckboxButtonInputModel extends HoistInputModel {
// Implementation
//----------------------------------
const cmp = hoistCmp.factory<CheckboxButtonInputModel>(
({model, text, icon, rightIcon, checkedIcon, uncheckedIcon, iconSide, ...props}, ref) => {
(
{
// HoistInput props - exclude from passthrough to BP
bind,
value,
commitOnChange,
onChange,
onCommit,
// Consumed by this component
model,
text,
icon,
rightIcon,
checkedIcon,
uncheckedIcon,
iconSide,
// Remainder passed to hoist button & BP button
...props
},
ref
) => {
const checked = !!model.renderValue,
toggleIcon = checked
? withDefault(checkedIcon, Icon.checkSquare({prefix: 'fas', intent: 'primary'}))
Expand Down
19 changes: 18 additions & 1 deletion mobile/cmp/input/CheckboxButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,24 @@ class CheckboxButtonInputModel extends HoistInputModel {
// Implementation
//----------------------------------
const cmp = hoistCmp.factory<CheckboxButtonInputModel>(
({model, text, checkedIcon, uncheckedIcon, ...props}, ref) => {
(
{
// HoistInput props - exclude from passthrough to Onsen
bind,
value,
commitOnChange,
onChange,
onCommit,
// Consumed by this component
model,
text,
checkedIcon,
uncheckedIcon,
// Remainder passed to hoist button & Onsen button
...props
},
ref
) => {
const checked = !!model.renderValue;
return button({
text: withDefault(text, model.getField()?.displayName),
Expand Down
Loading