mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
Fixed highlighting text on drag
This commit is contained in:
@@ -192,7 +192,7 @@ export default function Workflow() {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="w-full h-[calc(100vh-56px)] overflow-hidden"
|
||||
className="w-full h-[calc(100vh-56px)] overflow-hidden select-none"
|
||||
onWheel={handleWheel}
|
||||
>
|
||||
<div
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Input } from '@/components/ui/input'
|
||||
import { useState } from 'react'
|
||||
|
||||
interface ShortInputProps {
|
||||
placeholder: string
|
||||
placeholder?: string
|
||||
password?: boolean
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export function ShortInput({ placeholder, password }: ShortInputProps) {
|
||||
return (
|
||||
<Input
|
||||
className="w-full"
|
||||
placeholder={placeholder}
|
||||
placeholder={placeholder ?? ''}
|
||||
type={password && !isFocused ? 'password' : 'text'}
|
||||
value={value}
|
||||
onChange={(e) => setValue(e.target.value)}
|
||||
|
||||
@@ -19,10 +19,12 @@ export function SubBlock({ config }: SubBlockProps) {
|
||||
const renderInput = () => {
|
||||
switch (config.type) {
|
||||
case 'short-input':
|
||||
return <ShortInput
|
||||
placeholder={config.placeholder ?? ''}
|
||||
password={config.password}
|
||||
/>
|
||||
return (
|
||||
<ShortInput
|
||||
placeholder={config.placeholder}
|
||||
password={config.password}
|
||||
/>
|
||||
)
|
||||
case 'long-input':
|
||||
return <LongInput />
|
||||
case 'dropdown':
|
||||
|
||||
@@ -109,7 +109,7 @@ export function WorkflowBlock({
|
||||
return (
|
||||
<Card
|
||||
className={cn(
|
||||
'absolute w-[320px] shadow-md cursor-move',
|
||||
'absolute w-[320px] shadow-md cursor-move select-none',
|
||||
'transform -translate-x-1/2 -translate-y-1/2',
|
||||
isDragging && 'pointer-events-none'
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user