Skip to content

Commit adc23ca

Browse files
committed
fix: always dispatch a fresh BigJs object to Saved attribute
Likely because of some mobx magic the object returned by computed is frozen at times. And this leads to internal crashes in the framework. Prevent this bu passing fresh object to setValue
1 parent 9d0e652 commit adc23ca

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

packages/pluggableWidgets/datagrid-number-filter-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed an issue where widgets with the Saved attribute configured would crash in some cases.
12+
913
## [3.8.1] - 2026-02-19
1014

1115
### Changed

packages/shared/widget-plugin-filtering/src/helpers/useBasicSync.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export function useBasicSync<T extends string | Big>(props: Props<T>, store: Inp
3131
function createPusher<T extends string | Big>(pbox: PropBox<T>): Pusher<T> {
3232
return ([value1, _value2, _value3]) => {
3333
const props = pbox.current;
34-
props.valueAttribute?.setValue(value1 ?? undefined);
34+
35+
props.valueAttribute?.setValue(((value1 instanceof Big ? new Big(value1) : value1) as T) ?? undefined);
3536

3637
if (props.onChange?.canExecute) {
3738
props.onChange?.execute();

0 commit comments

Comments
 (0)