fix: correct propagation on settings menu (#1453)

* fix propagation error on settings menu
This commit is contained in:
Pyx
2025-12-29 17:57:49 -05:00
committed by GitHub
parent 9841cfba38
commit 42058ff6d6
4 changed files with 15 additions and 1 deletions
@@ -407,6 +407,7 @@ export const PlayerConfig = () => {
size: 'lg',
}}
size="sm"
stopsPropagation
tooltip={{
label: t('common.setting_other', { postProcess: 'titleCase' }),
openDelay: 0,
@@ -95,7 +95,10 @@ const AutoDJButton = () => {
return (
<Button
onClick={toggleAutoDJ}
onClick={(e) => {
e.stopPropagation();
toggleAutoDJ();
}}
size="compact-xs"
style={{ color: settings.enabled ? 'var(--theme-colors-primary)' : undefined }}
uppercase
@@ -202,6 +202,7 @@ export const ListConfigTable = ({
}) => {
return (
<Table
onClick={(e) => e.stopPropagation()}
style={{ borderRadius: '1rem' }}
styles={{ th: { backgroundColor: 'initial', padding: 'var(--theme-spacing-md) 0' } }}
variant="vertical"
@@ -16,6 +16,7 @@ export interface ActionIconProps
MantineActionIconProps {
icon?: keyof typeof AppIcon;
iconProps?: Omit<IconProps, 'icon'>;
stopsPropagation?: boolean;
tooltip?: Omit<TooltipProps, 'children'>;
}
@@ -26,13 +27,20 @@ const _ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>(
classNames,
icon,
iconProps,
onClick,
size = 'sm',
stopsPropagation,
tooltip,
variant = 'default',
...props
},
ref,
) => {
const handleClick = (e: any) => {
if (stopsPropagation) e.stopPropagation();
if (onClick) onClick(e);
};
const actionIconProps: ActionIconProps = {
classNames: {
root: styles.root,
@@ -41,6 +49,7 @@ const _ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>(
size,
variant,
...props,
onClick: handleClick,
};
if (tooltip && icon) {