Commit 7963b699 authored by Chunchi Che's avatar Chunchi Che

add quick select for OptionModal

parent cd7b3165
Pipeline #28882 passed with stages
in 8 minutes and 56 seconds
.container {
:global(.ant-pro-checkcard-header) {
:global(.ant-pro-checkcard-description) {
font-family: var(--theme-font);
font-size: 2rem;
font-size: 0.9rem;
display: flex;
align-items: center;
justify-content: center;
......
......@@ -54,6 +54,13 @@ export const OptionModal = () => {
setSelecteds(Array.from({ length: maxPage }).map((_) => []));
}, [options]);
const onQuickSelect = (response: number) => {
if (store.min === 1) {
sendSelectOptionResponse(container.conn, response);
rs();
}
};
return (
<NeosModal
title={title}
......@@ -80,12 +87,16 @@ export const OptionModal = () => {
}}
>
{options.map((option, idx) => (
<CheckCard
<div
key={idx}
className={styles["check-card"]}
description={option.info}
value={option.response}
/>
onDoubleClick={() => onQuickSelect(option.response)}
>
<CheckCard
className={styles["check-card"]}
description={option.info}
value={option.response}
/>
</div>
))}
</CheckCard.Group>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment