mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-28 20:04:26 +00:00
fix(webui): fix select field height and multi-select overflow/interaction issues (#307)
* fix(webui): standardize single-select custom field height * fix(webui): fix multi-select badge overflow calculation and simplify direct edit
This commit is contained in:
@@ -99,10 +99,11 @@ const SelectField: React.FC<FieldProps<string>> = ({
|
||||
}
|
||||
|
||||
const renderOptionBadge = (option: SelectOption | undefined) => {
|
||||
if (!option) return <span className="text-muted-foreground italic">Select an option</span>
|
||||
if (!option)
|
||||
return <span className="text-muted-foreground italic text-sm">Select an option</span>
|
||||
return (
|
||||
<span
|
||||
className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium"
|
||||
className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium h-[22px]"
|
||||
style={getOptionStyle(option.color)}
|
||||
>
|
||||
{option.displayName}
|
||||
@@ -116,7 +117,7 @@ const SelectField: React.FC<FieldProps<string>> = ({
|
||||
<PopoverTrigger asChild>
|
||||
<div
|
||||
onClick={handleStartEdit}
|
||||
className={`flex items-center justify-between w-full min-h-[28px] px-2 py-1 rounded border border-transparent transition-colors ${
|
||||
className={`flex items-center justify-between w-full h-[28px] px-2 rounded border border-transparent transition-colors ${
|
||||
!readOnly ? 'cursor-pointer hover:bg-accent hover:border-border group' : ''
|
||||
}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user