Adding dependency to pagination compoenent