mirror of https://github.com/buster-so/buster.git
prevent focus capture from segmented
This commit is contained in:
parent
207be8c4c1
commit
ba9155a9af
|
@ -166,6 +166,7 @@ const ModePopoverContent = ({
|
|||
side="bottom"
|
||||
sideOffset={10}
|
||||
className="p-0"
|
||||
onOpenAutoFocus={(e) => e.preventDefault()}
|
||||
content={
|
||||
<div className={cn('flex flex-col space-y-3 max-w-[210px] py-3')}>
|
||||
<div className={cn('flex flex-col space-y-1', classes)}>
|
||||
|
|
|
@ -95,6 +95,7 @@ export const MentionInputSuggestions = forwardRef<
|
|||
const onSelectItem = useMemoizedFn(
|
||||
({ onClick, ...params }: MentionInputSuggestionsOnSelectParams) => {
|
||||
const { addValueToInput, loading, label, disabled, inputValue } = params;
|
||||
console.log('onSelectItem', params);
|
||||
if (disabled) {
|
||||
console.warn('Item is disabled', params);
|
||||
return;
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
|
||||
export interface PopoverProps
|
||||
extends React.ComponentProps<typeof PopoverBase>,
|
||||
Pick<React.ComponentProps<typeof PopoverContent>, 'align' | 'side'> {
|
||||
Pick<React.ComponentProps<typeof PopoverContent>, 'align' | 'side' | 'onOpenAutoFocus'> {
|
||||
children: React.ReactNode;
|
||||
content: React.ReactNode;
|
||||
className?: string;
|
||||
|
@ -28,6 +28,7 @@ export const Popover = React.memo<PopoverProps>(
|
|||
trigger = 'click',
|
||||
size = 'default',
|
||||
sideOffset,
|
||||
onOpenAutoFocus,
|
||||
...props
|
||||
}) => {
|
||||
return (
|
||||
|
@ -41,6 +42,7 @@ export const Popover = React.memo<PopoverProps>(
|
|||
className={className}
|
||||
size={size}
|
||||
sideOffset={sideOffset}
|
||||
onOpenAutoFocus={onOpenAutoFocus}
|
||||
>
|
||||
{content}
|
||||
</PopoverContent>
|
||||
|
|
Loading…
Reference in New Issue