Disable Prev or Next Button if there is no slides available before or after the current slide in react-id-swiper

I used react id Swiper's Manipulating component outside Swiper

https://kidjp85.github.io/example/manipulating-component-outside-swiper/

Now, i want to disable the previous button if there is no slides available before the current showing slide or to disable next button vise versa..

There is no options in official documentation. is there anyway to achieve this?