@chekinapp/ui 0.0.133 → 0.0.134
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.cjs +20 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13267,13 +13267,21 @@ function useSelectState(params) {
|
|
|
13267
13267
|
(option) => isOptionSelected2(option, selectedOptions),
|
|
13268
13268
|
[isOptionSelected2, selectedOptions]
|
|
13269
13269
|
);
|
|
13270
|
+
const sssDebugSelectOptionCount = React48.useRef(0);
|
|
13270
13271
|
const selectOption = React48.useCallback(
|
|
13271
13272
|
(option) => {
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
currentSelectedCount: selectedOptions.length
|
|
13276
|
-
|
|
13273
|
+
sssDebugSelectOptionCount.current += 1;
|
|
13274
|
+
console.log(
|
|
13275
|
+
`[SC-debug] selectOption #${sssDebugSelectOptionCount.current}`,
|
|
13276
|
+
{ value: option.value, isMulti, currentSelectedCount: selectedOptions.length }
|
|
13277
|
+
);
|
|
13278
|
+
console.trace("[SC-debug] selectOption caller stack");
|
|
13279
|
+
if (sssDebugSelectOptionCount.current === 5) {
|
|
13280
|
+
console.warn(
|
|
13281
|
+
"[SC-debug] selectOption fired 5x \u2014 pausing. Step out to see the caller."
|
|
13282
|
+
);
|
|
13283
|
+
debugger;
|
|
13284
|
+
}
|
|
13277
13285
|
if (!isOptionEnabled(option, isOptionDisabled)) return;
|
|
13278
13286
|
if (isMulti) {
|
|
13279
13287
|
const exists = isValueSelected(option);
|
|
@@ -14977,13 +14985,15 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14977
14985
|
);
|
|
14978
14986
|
const currentValue = isControlled ? value : internalValue;
|
|
14979
14987
|
const selected = React59.useMemo(() => currentValue ?? [], [currentValue]);
|
|
14988
|
+
const scDebugHandleChangeCount = React59.useRef(0);
|
|
14980
14989
|
const handleChange = React59.useCallback(
|
|
14981
14990
|
(next, meta) => {
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
isControlled
|
|
14986
|
-
|
|
14991
|
+
scDebugHandleChangeCount.current += 1;
|
|
14992
|
+
console.log(
|
|
14993
|
+
`[SC-debug] handleChange #${scDebugHandleChangeCount.current}`,
|
|
14994
|
+
{ action: meta?.action, nextLength: next.length, isControlled }
|
|
14995
|
+
);
|
|
14996
|
+
console.trace("[SC-debug] handleChange caller stack");
|
|
14987
14997
|
if (!isControlled) setInternalValue(next);
|
|
14988
14998
|
onChange?.(next, meta);
|
|
14989
14999
|
},
|