@trops/dash-core 0.1.553 → 0.1.554
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +15 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -12776,7 +12776,12 @@ var WidgetConfigPanel = function WidgetConfigPanel(_ref) {
|
|
|
12776
12776
|
itemSelected = _useState2[0],
|
|
12777
12777
|
setItemSelected = _useState2[1];
|
|
12778
12778
|
useEffect(function () {
|
|
12779
|
-
|
|
12779
|
+
// Only sync from the parent when the data actually differs.
|
|
12780
|
+
// Identity-only comparison fired on every parent re-render
|
|
12781
|
+
// (each edit round-trips through onChange → parent setState →
|
|
12782
|
+
// new item reference) and reset the input mid-keystroke,
|
|
12783
|
+
// making the userConfig inputs effectively untypeable.
|
|
12784
|
+
if (JSON.stringify(item) !== JSON.stringify(itemSelected)) {
|
|
12780
12785
|
setItemSelected(function () {
|
|
12781
12786
|
return item;
|
|
12782
12787
|
});
|
|
@@ -12842,7 +12847,15 @@ var WidgetConfigPanel = function WidgetConfigPanel(_ref) {
|
|
|
12842
12847
|
newItem["userPrefs"] = {};
|
|
12843
12848
|
}
|
|
12844
12849
|
newItem["userPrefs"][key] = value;
|
|
12845
|
-
//
|
|
12850
|
+
// Update local state immediately so the input reflects each
|
|
12851
|
+
// keystroke without waiting for the parent round-trip to come
|
|
12852
|
+
// back through props. Without this the InputText's `value` prop
|
|
12853
|
+
// stays at the pre-keystroke value, the typed char visibly
|
|
12854
|
+
// snaps away, and typing more than ~1 char per second is
|
|
12855
|
+
// effectively impossible.
|
|
12856
|
+
setItemSelected(function () {
|
|
12857
|
+
return newItem;
|
|
12858
|
+
});
|
|
12846
12859
|
onChange(null, newItem);
|
|
12847
12860
|
}
|
|
12848
12861
|
|