mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
improved export button
This commit is contained in:
@@ -29,30 +29,6 @@ type TableStateInUrl = 'sorting' | 'columnfilters' | 'pagination'
|
||||
selectorFn should only be defined if using this as a selecting table
|
||||
*/
|
||||
|
||||
const CrossSearchExportButton = () => {
|
||||
// loading is set to false after a timeout because actually knowing
|
||||
// once the file is downloaded is impossible when implemented this way
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Button
|
||||
href={`${BACKEND_URL}/crosssearch/export`}
|
||||
onClick={() => {
|
||||
setLoading(true)
|
||||
setTimeout(() => {
|
||||
setLoading(false)
|
||||
}, 20000)
|
||||
}}
|
||||
variant="contained"
|
||||
disabled={loading}
|
||||
>
|
||||
Export cross search table
|
||||
</Button>
|
||||
{loading && <CircularProgress />}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
export const TableView = <T extends MRT_RowData>({
|
||||
data,
|
||||
columns,
|
||||
|
||||
Reference in New Issue
Block a user