mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: update quick replies maxInput value
This commit is contained in:
parent
8e5574f32d
commit
56ae8a9993
@ -21,12 +21,14 @@ type QuickRepliesInput = {
|
|||||||
value: StdQuickReply[];
|
value: StdQuickReply[];
|
||||||
onChange: (patterns: StdQuickReply[]) => void;
|
onChange: (patterns: StdQuickReply[]) => void;
|
||||||
minInput?: number;
|
minInput?: number;
|
||||||
|
maxInput?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const QuickRepliesInput: FC<QuickRepliesInput> = ({
|
const QuickRepliesInput: FC<QuickRepliesInput> = ({
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
minInput = 1,
|
minInput = 1,
|
||||||
|
maxInput = 11,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslate();
|
const { t } = useTranslate();
|
||||||
const [quickReplies, setQuickReplies] = useState<
|
const [quickReplies, setQuickReplies] = useState<
|
||||||
@ -109,7 +111,7 @@ const QuickRepliesInput: FC<QuickRepliesInput> = ({
|
|||||||
onClick={addInput}
|
onClick={addInput}
|
||||||
startIcon={<AddIcon />}
|
startIcon={<AddIcon />}
|
||||||
sx={{ marginTop: 2, float: "right" }}
|
sx={{ marginTop: 2, float: "right" }}
|
||||||
disabled={quickReplies.length > 10}
|
disabled={quickReplies.length >= maxInput}
|
||||||
>
|
>
|
||||||
{t("button.add")}
|
{t("button.add")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user