Estoy generando una hoja de Excel usando exceljs y descargándola usando paquetes de ahorro de archivos
const saveFile = async (fileName: any, workbook: any) => { protectSheet(validationSheet) const xls64 = await workbook.xlsx.writeBuffer({ base64: true }) saveAs( new Blob([xls64], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }), fileName ) }el problema es cuando activo esta función haciendo clic en este botón
<button ref={buttonRef} className="btn btn-info" onClick={() => { saveFile(fileName, workbook) }}>Download file</button>lleva algún tiempo proteger y generar el archivo de Excel. necesito deshabilitar el botón durante la fase de protección y generación y luego volver a habilitarlo después de la descarga