@true-engineering/true-react-common-ui-kit 4.0.0-alpha24 → 4.0.0-alpha25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "4.0.0-alpha24",
3
+ "version": "4.0.0-alpha25",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -121,10 +121,8 @@ export const WithPopup: FC<IWithPopupProps> = ({
121
121
 
122
122
  const handleToggle = (isActive: boolean, event?: IWithPopupToggleEvent) => {
123
123
  event?.stopPropagation();
124
- if (!isDisabled) {
125
- onToggle?.(isActive, event);
126
- setIsOpen(isActive);
127
- }
124
+ onToggle?.(isActive, event);
125
+ setIsOpen(isActive);
128
126
  };
129
127
 
130
128
  const handleClose = (event?: IWithPopupToggleEvent) => {
@@ -132,7 +130,7 @@ export const WithPopup: FC<IWithPopupProps> = ({
132
130
  };
133
131
 
134
132
  const { refs, floatingStyles, context } = useFloating({
135
- open: isOpen,
133
+ open: isOpen && !isDisabled,
136
134
  middleware: [
137
135
  offset(popupOffset),
138
136
  canBeFlipped && flip({ fallbackAxisSideDirection: 'start' }),