Skip to content

Commit

Permalink
fix: update quick replies maxInput value
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinedorbozgithub committed Dec 10, 2024
1 parent 8e5574f commit 56ae8a9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ type QuickRepliesInput = {
value: StdQuickReply[];
onChange: (patterns: StdQuickReply[]) => void;
minInput?: number;
maxInput?: number;
};

const QuickRepliesInput: FC<QuickRepliesInput> = ({
value,
onChange,
minInput = 1,
maxInput = 11,
}) => {
const { t } = useTranslate();
const [quickReplies, setQuickReplies] = useState<
Expand Down Expand Up @@ -109,7 +111,7 @@ const QuickRepliesInput: FC<QuickRepliesInput> = ({
onClick={addInput}
startIcon={<AddIcon />}
sx={{ marginTop: 2, float: "right" }}
disabled={quickReplies.length > 10}
disabled={quickReplies.length >= maxInput}
>
{t("button.add")}
</Button>
Expand Down

0 comments on commit 56ae8a9

Please sign in to comment.