mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 03:32:37 -06:00
TagsInput: Fix layout issue with tags input (#33907)
This commit is contained in:
parent
e98a8bd11b
commit
d2a1b8fd95
@ -47,27 +47,28 @@ export const TagsInput: FC<Props> = ({ placeholder = 'New tag (enter key to add)
|
||||
return <TagItem key={`${tag}-${index}`} name={tag} onRemove={onRemove} />;
|
||||
})}
|
||||
</div>
|
||||
|
||||
<Input
|
||||
placeholder={placeholder}
|
||||
onChange={onNameChange}
|
||||
value={newTagName}
|
||||
onKeyUp={onKeyboardAdd}
|
||||
suffix={
|
||||
newTagName.length > 0 && (
|
||||
<Button fill="text" className={styles.addButtonStyle} onClick={onAdd} size="md">
|
||||
Add
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
/>
|
||||
<div>
|
||||
<Input
|
||||
placeholder={placeholder}
|
||||
onChange={onNameChange}
|
||||
value={newTagName}
|
||||
onKeyUp={onKeyboardAdd}
|
||||
suffix={
|
||||
newTagName.length > 0 && (
|
||||
<Button fill="text" className={styles.addButtonStyle} onClick={onAdd} size="md">
|
||||
Add
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const getStyles = (theme: GrafanaTheme) => ({
|
||||
wrapper: css`
|
||||
height: ${theme.spacing.formInputHeight}px;
|
||||
min-height: ${theme.spacing.formInputHeight}px;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
Loading…
Reference in New Issue
Block a user