mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
feat: Updating the format of the name of exported file in table component (#8885)
* Update the format of the name of exported file in table component. * Replace : with - * Use moment instead of date-fns * render fix --------- Co-authored-by: Adish M <adish.madhu@gmail.com> Co-authored-by: Johnson Cherian <johnsonc.dev@gmail.com>
This commit is contained in:
parent
a36f4ced00
commit
3d54af4264
1 changed files with 6 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
|||
import { OverlayTriggerComponent } from './OverlayTriggerComponent';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import { diff } from 'deep-object-diff';
|
||||
import moment from 'moment';
|
||||
|
||||
// utilityForNestedNewRow function is used to construct nested object while adding or updating new row when '.' is present in column key for adding new row
|
||||
const utilityForNestedNewRow = (row) => {
|
||||
|
|
@ -344,6 +345,10 @@ export function Table({
|
|||
}
|
||||
}
|
||||
|
||||
function getExportFileName() {
|
||||
return `${component?.name}_${moment().format('DD-MM-YYYY_HH-mm')}`;
|
||||
}
|
||||
|
||||
function onPageIndexChanged(page) {
|
||||
onComponentOptionChanged(component, 'pageIndex', page).then(() => {
|
||||
onEvent('onPageChanged', tableEvents, { component });
|
||||
|
|
@ -633,6 +638,7 @@ export function Table({
|
|||
pageCount: -1,
|
||||
manualPagination: false,
|
||||
getExportFileBlob,
|
||||
getExportFileName,
|
||||
disableSortBy: !enabledSort,
|
||||
manualSortBy: serverSideSort,
|
||||
stateReducer: (newState, action, prevState) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue