We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👍
Originally posted by @AllenFang in #1042 (comment)
The text was updated successfully, but these errors were encountered:
I figured out the case for myself:
After e.stopPropagation() for un-used columns, bind customised action for column
e.stopPropagation()
const [showConfirmModal, setShowConfirmModal] = useState(false); // store targeted Id for API purpose const activeId = useRef(null); // UI purpose for calculate modal postion const [activeIndex, setActiveIndex] = useState(0); const rowEvents = { onClick: (e, row, rowIndex) => { setActiveIndex(rowIndex); setShowConfirmModal(true); activeId.current = row.id; }, };
UI
{showConfirmModal ? ( <div className="delete-confirm-modal" style={{ position: 'absolute', // based on rowIndex and rowHeight: 50px top: `${(activeIndex + 1) * 50}px`, right: '-90px', }} > Confirm delete? <div> <button onClick={() => { setShowConfirmModal(false); }} > Cancel </button> <button onClick={() => { // use for API console.log('activeId', activeId.current); }} > Confirm </button> </div> </div> ) : null}
Sorry, something went wrong.
No branches or pull requests
👍
Originally posted by @AllenFang in #1042 (comment)
The text was updated successfully, but these errors were encountered: