@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 CHANGED
@@ -13631,13 +13631,21 @@ function useSelectState(params) {
13631
13631
  (option) => isOptionSelected2(option, selectedOptions),
13632
13632
  [isOptionSelected2, selectedOptions]
13633
13633
  );
13634
+ const sssDebugSelectOptionCount = React48.useRef(0);
13634
13635
  const selectOption = React48.useCallback(
13635
13636
  (option) => {
13636
- console.log("[SC-debug] selectOption called", {
13637
- value: option.value,
13638
- isMulti,
13639
- currentSelectedCount: selectedOptions.length
13640
- });
13637
+ sssDebugSelectOptionCount.current += 1;
13638
+ console.log(
13639
+ `[SC-debug] selectOption #${sssDebugSelectOptionCount.current}`,
13640
+ { value: option.value, isMulti, currentSelectedCount: selectedOptions.length }
13641
+ );
13642
+ console.trace("[SC-debug] selectOption caller stack");
13643
+ if (sssDebugSelectOptionCount.current === 5) {
13644
+ console.warn(
13645
+ "[SC-debug] selectOption fired 5x \u2014 pausing. Step out to see the caller."
13646
+ );
13647
+ debugger;
13648
+ }
13641
13649
  if (!isOptionEnabled(option, isOptionDisabled)) return;
13642
13650
  if (isMulti) {
13643
13651
  const exists = isValueSelected(option);
@@ -15341,13 +15349,15 @@ function SelectCheckboxesInternal(props, ref) {
15341
15349
  );
15342
15350
  const currentValue = isControlled ? value : internalValue;
15343
15351
  const selected = React59.useMemo(() => currentValue ?? [], [currentValue]);
15352
+ const scDebugHandleChangeCount = React59.useRef(0);
15344
15353
  const handleChange = React59.useCallback(
15345
15354
  (next, meta) => {
15346
- console.log("[SC-debug] handleChange", {
15347
- action: meta?.action,
15348
- nextLength: next.length,
15349
- isControlled
15350
- });
15355
+ scDebugHandleChangeCount.current += 1;
15356
+ console.log(
15357
+ `[SC-debug] handleChange #${scDebugHandleChangeCount.current}`,
15358
+ { action: meta?.action, nextLength: next.length, isControlled }
15359
+ );
15360
+ console.trace("[SC-debug] handleChange caller stack");
15351
15361
  if (!isControlled) setInternalValue(next);
15352
15362
  onChange?.(next, meta);
15353
15363
  },