mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
fix: correct propagation on settings menu (#1453)
* fix propagation error on settings menu
This commit is contained in:
@@ -407,6 +407,7 @@ export const PlayerConfig = () => {
|
|||||||
size: 'lg',
|
size: 'lg',
|
||||||
}}
|
}}
|
||||||
size="sm"
|
size="sm"
|
||||||
|
stopsPropagation
|
||||||
tooltip={{
|
tooltip={{
|
||||||
label: t('common.setting_other', { postProcess: 'titleCase' }),
|
label: t('common.setting_other', { postProcess: 'titleCase' }),
|
||||||
openDelay: 0,
|
openDelay: 0,
|
||||||
|
|||||||
@@ -95,7 +95,10 @@ const AutoDJButton = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
onClick={toggleAutoDJ}
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
toggleAutoDJ();
|
||||||
|
}}
|
||||||
size="compact-xs"
|
size="compact-xs"
|
||||||
style={{ color: settings.enabled ? 'var(--theme-colors-primary)' : undefined }}
|
style={{ color: settings.enabled ? 'var(--theme-colors-primary)' : undefined }}
|
||||||
uppercase
|
uppercase
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ export const ListConfigTable = ({
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Table
|
<Table
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
style={{ borderRadius: '1rem' }}
|
style={{ borderRadius: '1rem' }}
|
||||||
styles={{ th: { backgroundColor: 'initial', padding: 'var(--theme-spacing-md) 0' } }}
|
styles={{ th: { backgroundColor: 'initial', padding: 'var(--theme-spacing-md) 0' } }}
|
||||||
variant="vertical"
|
variant="vertical"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export interface ActionIconProps
|
|||||||
MantineActionIconProps {
|
MantineActionIconProps {
|
||||||
icon?: keyof typeof AppIcon;
|
icon?: keyof typeof AppIcon;
|
||||||
iconProps?: Omit<IconProps, 'icon'>;
|
iconProps?: Omit<IconProps, 'icon'>;
|
||||||
|
stopsPropagation?: boolean;
|
||||||
tooltip?: Omit<TooltipProps, 'children'>;
|
tooltip?: Omit<TooltipProps, 'children'>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,13 +27,20 @@ const _ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>(
|
|||||||
classNames,
|
classNames,
|
||||||
icon,
|
icon,
|
||||||
iconProps,
|
iconProps,
|
||||||
|
onClick,
|
||||||
size = 'sm',
|
size = 'sm',
|
||||||
|
stopsPropagation,
|
||||||
tooltip,
|
tooltip,
|
||||||
variant = 'default',
|
variant = 'default',
|
||||||
...props
|
...props
|
||||||
},
|
},
|
||||||
ref,
|
ref,
|
||||||
) => {
|
) => {
|
||||||
|
const handleClick = (e: any) => {
|
||||||
|
if (stopsPropagation) e.stopPropagation();
|
||||||
|
if (onClick) onClick(e);
|
||||||
|
};
|
||||||
|
|
||||||
const actionIconProps: ActionIconProps = {
|
const actionIconProps: ActionIconProps = {
|
||||||
classNames: {
|
classNames: {
|
||||||
root: styles.root,
|
root: styles.root,
|
||||||
@@ -41,6 +49,7 @@ const _ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>(
|
|||||||
size,
|
size,
|
||||||
variant,
|
variant,
|
||||||
...props,
|
...props,
|
||||||
|
onClick: handleClick,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (tooltip && icon) {
|
if (tooltip && icon) {
|
||||||
|
|||||||
Reference in New Issue
Block a user