File tree Expand file tree Collapse file tree
src/components/actions/Button Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @cube-dev/ui-kit " : patch
3+ ---
4+
5+ Fix ` Button ` disabled state resolution in ` Button.Split ` context.
6+
7+ - Replace ` ?? ` chain with ` || ` so that ` isLoading={false} ` no longer blocks ` splitContext.isDisabled ` inheritance
8+ - Ensure ` splitContext.isDisabled ` always wins over child props (a disabled split button should disable all children)
9+ - Fix edge case where ` isDisabled={false} ` with ` isLoading={true} ` incorrectly resulted in a clickable loading button
Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ export const Button = forwardRef(function Button(
400400 sizeProp ?? splitContext ?. size ?? ( type === 'link' ? 'inline' : 'medium' ) ;
401401
402402 const isDisabled =
403- props . isDisabled ?? props . isLoading ?? splitContext ?. isDisabled ;
403+ splitContext ? .isDisabled || props . isDisabled || props . isLoading ;
404404 const isLoading = props . isLoading ;
405405 const isSelected = props . isSelected ;
406406
You can’t perform that action at this time.
0 commit comments