Giter VIP home page Giter VIP logo

Comments (5)

gregnb avatar gregnb commented on July 1, 2024

Right, because as it stands today this is only triggered by a click event. I'm not sure if this package should be setting up an event listener for CTRL+P. Let me think about it. Maybe it could be an option turned on/off, but off by default

from react-to-print.

putnap avatar putnap commented on July 1, 2024

Well,
I understand why you might feel hesitant, but it defeats the purpose of this control if it can't be triggered when user selects CTRL+P or even Print icon in the toolbar of browser. Means my whole print logic goes out the window...

from react-to-print.

gregnb avatar gregnb commented on July 1, 2024

Right, but think about this for a moment. What about people who have multiple instances of this component on a single page? When a user selects CTRL+P which instance of the component should it print? I can see that becoming a tricky situation

Maybe adding a option that is turned off by default could be a compromise

from react-to-print.

putnap avatar putnap commented on July 1, 2024

You are right... I believe an option is a must to make this control complete solution to printing needs. I'm pretty new to web development in general, I couldn't find a workaround for this. I tried using media matching and then calling the controls trigger, but it didn't work... Any ideas?

from react-to-print.

thamjieying avatar thamjieying commented on July 1, 2024

if you want to trigger print page, maybe you should consider react-print instead, or use print media

from react-to-print.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.