mirror of https://github.com/buster-so/buster.git
scrollable inputs
This commit is contained in:
parent
9dc07398c6
commit
6c6b9a3109
|
@ -11,6 +11,7 @@ import type {
|
||||||
MentionSuggestionExtension,
|
MentionSuggestionExtension,
|
||||||
} from '@/components/ui/inputs/MentionInput';
|
} from '@/components/ui/inputs/MentionInput';
|
||||||
import type {
|
import type {
|
||||||
|
MentionInputSuggestionsOnSelectParams,
|
||||||
MentionInputSuggestionsProps,
|
MentionInputSuggestionsProps,
|
||||||
MentionInputSuggestionsRef,
|
MentionInputSuggestionsRef,
|
||||||
} from '@/components/ui/inputs/MentionInputSuggestions';
|
} from '@/components/ui/inputs/MentionInputSuggestions';
|
||||||
|
@ -107,8 +108,10 @@ export const BusterChatInputBase: React.FC<BusterChatInputProps> = React.memo(
|
||||||
onSubmit({ ...value, mode });
|
onSubmit({ ...value, mode });
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSuggestionItemClick = useMemoizedFn(() => {
|
const onSuggestionItemClick = useMemoizedFn((d: MentionInputSuggestionsOnSelectParams) => {
|
||||||
onSubmitPreflight();
|
if (d.addValueToInput) {
|
||||||
|
onSubmitPreflight();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const onCloseCreateShortcutModal = useMemoizedFn(() => {
|
const onCloseCreateShortcutModal = useMemoizedFn(() => {
|
||||||
|
|
|
@ -146,8 +146,13 @@ const ShortcutItem: React.FC<{
|
||||||
}> = React.memo(({ shortcut, onOpenEditShortcutModal }) => {
|
}> = React.memo(({ shortcut, onOpenEditShortcutModal }) => {
|
||||||
const { mutateAsync: deleteShortcut } = useDeleteShortcut();
|
const { mutateAsync: deleteShortcut } = useDeleteShortcut();
|
||||||
return (
|
return (
|
||||||
<div className="px-4 py-3.5 flex justify-between items-center gap-x-4 hover:bg-item-hover/60 border-b last:border-b-0">
|
<div
|
||||||
<div className="flex flex-col space-y-0">
|
className="px-4 py-3.5 flex justify-between items-center gap-x-4 hover:bg-item-hover/25 border-b last:border-b-0 cursor-pointer"
|
||||||
|
onClick={() => {
|
||||||
|
onOpenEditShortcutModal(shortcut.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="flex flex-col space-y-1">
|
||||||
<Text>{shortcut.name}</Text>
|
<Text>{shortcut.name}</Text>
|
||||||
<Paragraph size={'xs'} variant={'secondary'} className="line-clamp-2">
|
<Paragraph size={'xs'} variant={'secondary'} className="line-clamp-2">
|
||||||
{shortcut.instructions}
|
{shortcut.instructions}
|
||||||
|
|
|
@ -35,7 +35,7 @@ export const Route = createFileRoute('/app/_app/home')({
|
||||||
|
|
||||||
function RouteComponent() {
|
function RouteComponent() {
|
||||||
return (
|
return (
|
||||||
<AppPageLayout headerSizeVariant="list" header={<HomePageHeader />}>
|
<AppPageLayout headerSizeVariant="list" header={<HomePageHeader />} scrollable>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</AppPageLayout>
|
</AppPageLayout>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue