You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractPagedList.js 821B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // @flow
  2. import { Component } from 'react';
  3. /**
  4. * The page to be displayed on render.
  5. */
  6. export const DEFAULT_PAGE = 0;
  7. type Props = {
  8. /**
  9. * Indicates if the list is disabled or not.
  10. */
  11. disabled: boolean,
  12. /**
  13. * The Redux dispatch function.
  14. */
  15. dispatch: Function,
  16. /**
  17. * The i18n translate function
  18. */
  19. t: Function
  20. }
  21. type State = {
  22. /**
  23. * The currently selected page.
  24. */
  25. pageIndex: number
  26. }
  27. /**
  28. * Abstract class for the platform specific paged lists.
  29. */
  30. export default class AbstractPagedList extends Component<Props, State> {
  31. /**
  32. * Constructor of the component.
  33. *
  34. * @inheritdoc
  35. */
  36. constructor(props: Props) {
  37. super(props);
  38. this.state = {
  39. pageIndex: DEFAULT_PAGE
  40. };
  41. }
  42. }