enforce length in TagInput
This commit is contained in:
@@ -57,7 +57,8 @@ export function TagInput({
|
|||||||
const onSubmitEditing = React.useCallback(() => {
|
const onSubmitEditing = React.useCallback(() => {
|
||||||
const tag = sanitize(value)
|
const tag = sanitize(value)
|
||||||
|
|
||||||
if (tag.length > 0) {
|
// enforce max hashtag length
|
||||||
|
if (tag.length > 0 && tag.length <= 64) {
|
||||||
handleChangeTags(uniq([...tags, tag]).slice(0, max))
|
handleChangeTags(uniq([...tags, tag]).slice(0, max))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user