You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if it is in the scope of this library, but I think it could be very nice to have such callback. For example, I have some collection of data and. For each item I have a button "Print Invoice". It would be very nice to update "Printable" component data instead of render it for each item.
Something like this:
static propTypes = {
/** Copy styles over into print window. default: true /
copyStyles: PropTypes.bool,
/* Trigger action used to open browser print /
trigger: PropTypes.func.isRequired,
/* Content to be printed /
content: PropTypes.func.isRequired,
/* if you need to do something with the data for printable component
right before the print */
onBeforePrint: PropTypes.func,
};
I haven't checked it yet and I'm not sure if it's necessary for this library.
Sorry for every day comments here :) I have a project where I'll need to print a lot of data and while I researched print-connected libraries for React, I've found your library potentially the most useful for this project.
The text was updated successfully, but these errors were encountered:
I don't know if it is in the scope of this library, but I think it could be very nice to have such callback. For example, I have some collection of data and. For each item I have a button "Print Invoice". It would be very nice to update "Printable" component data instead of render it for each item.
Something like this:
static propTypes = {
/** Copy styles over into print window. default: true /
copyStyles: PropTypes.bool,
/* Trigger action used to open browser print /
trigger: PropTypes.func.isRequired,
/* Content to be printed /
content: PropTypes.func.isRequired,
/* if you need to do something with the data for printable component
right before the print */
onBeforePrint: PropTypes.func,
};
static defaultProps = {
copyStyles: true,
onBeforePrint: () => {},
};
...
handlePrint = () => {
}
I haven't checked it yet and I'm not sure if it's necessary for this library.
Sorry for every day comments here :) I have a project where I'll need to print a lot of data and while I researched print-connected libraries for React, I've found your library potentially the most useful for this project.
The text was updated successfully, but these errors were encountered: