Skip to content

Commit

Permalink
fix/ prevent form submission on expanding card
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali(Ako) Hosseini committed Mar 13, 2022
1 parent 875a83a commit 2671f6c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import ExpandedCard from './ExpandedCard.jsx';
import PropTypes from 'prop-types';

const Card = ({ card, handleChange, handleBlur, values, setFieldValue, index, error }) => {
const onClick = () => setIsOpen(!is_open);
const onClick = e => {
e.preventDefault();
setIsOpen(!is_open);
};
const [is_open, setIsOpen] = React.useState(false);
const icon = (
<Icon
Expand Down

0 comments on commit 2671f6c

Please sign in to comment.