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 744B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 i18n translate function
  14. */
  15. t: Function
  16. }
  17. type State = {
  18. /**
  19. * The currently selected page.
  20. */
  21. pageIndex: number
  22. }
  23. /**
  24. * Abstract class for the platform specific paged lists.
  25. */
  26. export default class AbstractPagedList extends Component<Props, State> {
  27. /**
  28. * Constructor of the component.
  29. *
  30. * @inheritdoc
  31. */
  32. constructor(props: Props) {
  33. super(props);
  34. this.state = {
  35. pageIndex: DEFAULT_PAGE
  36. };
  37. }
  38. }