@plasmicapp/react-web 0.2.277 → 0.2.278

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.js CHANGED
@@ -3462,6 +3462,7 @@ function useAriaSelectProps(props, config) {
3462
3462
  }
3463
3463
  function useSelect(plasmicClass, props, config, ref) {
3464
3464
  var _a, _b;
3465
+ var _c;
3465
3466
  if (ref === void 0) { ref = null; }
3466
3467
  useEnsureSSRProvider();
3467
3468
  var ariaProps = useAriaSelectProps(props, config).ariaProps;
@@ -3471,9 +3472,9 @@ function useSelect(plasmicClass, props, config, ref) {
3471
3472
  var rootRef = React__namespace.useRef(null);
3472
3473
  var isDisabled = props.isDisabled, name = props.name, menuWidth = props.menuWidth, menuMatchTriggerWidth = props.menuMatchTriggerWidth, autoFocus = props.autoFocus, placeholder = props.placeholder, selectedContent = props.selectedContent;
3473
3474
  var canvasCtx = host.usePlasmicCanvasContext();
3474
- var _c = select$1.useSelect(ariaProps, state, triggerRef), triggerPressProps = _c.triggerProps, menuProps = _c.menuProps;
3475
+ var _d = select$1.useSelect(ariaProps, state, triggerRef), triggerPressProps = _d.triggerProps, menuProps = _d.menuProps;
3475
3476
  var triggerProps = interactions.usePress(__assign(__assign({}, triggerPressProps), { isDisabled: isDisabled })).pressProps;
3476
- var triggerContent = state.selectedItem.value
3477
+ var triggerContent = ((_c = state.selectedItem) === null || _c === void 0 ? void 0 : _c.value)
3477
3478
  ? selectedContent !== null && selectedContent !== void 0 ? selectedContent : getChildProp(state.selectedItem.value, "children")
3478
3479
  : null;
3479
3480
  var variants = __assign(__assign({}, pick.apply(void 0, __spreadArray([props], __read(plasmicClass.internalVariantProps), false))), mergeVariantToggles({ def: config.isOpenVariant, active: state.isOpen }, { def: config.placeholderVariant, active: !state.selectedItem }, { def: config.isDisabledVariant, active: isDisabled }));