How to use the react-jhipster.loadMoreDataWhenScrolled function in react-jhipster

To help you get started, we’ve selected a few react-jhipster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jhipster / jhipster-sample-app-react / src / main / webapp / app / entities / operation / operation.reducer.ts View on Github external
case FAILURE(ACTION_TYPES.DELETE_OPERATION):
      return {
        ...state,
        loading: false,
        updating: false,
        updateSuccess: false,
        errorMessage: action.payload
      };
    case SUCCESS(ACTION_TYPES.FETCH_OPERATION_LIST): {
      const links = parseHeaderForLinks(action.payload.headers.link);

      return {
        ...state,
        loading: false,
        links,
        entities: loadMoreDataWhenScrolled(state.entities, action.payload.data, links),
        totalItems: parseInt(action.payload.headers['x-total-count'], 10)
      };
    }
    case SUCCESS(ACTION_TYPES.FETCH_OPERATION):
      return {
        ...state,
        loading: false,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.CREATE_OPERATION):
    case SUCCESS(ACTION_TYPES.UPDATE_OPERATION):
      return {
        ...state,
        updating: false,
        updateSuccess: true,
        entity: action.payload.data
github oktadeveloper / okta-react-native-spring-boot-example / jhipster-api / src / main / webapp / app / entities / weight / weight.reducer.ts View on Github external
return {
        ...state,
        loading: false,
        updating: false,
        updateSuccess: false,
        errorMessage: action.payload
      };
    case SUCCESS(ACTION_TYPES.SEARCH_WEIGHTS):
    case SUCCESS(ACTION_TYPES.FETCH_WEIGHT_LIST):
      const links = parseHeaderForLinks(action.payload.headers.link);
      return {
        ...state,
        links,
        loading: false,
        totalItems: action.payload.headers['x-total-count'],
        entities: loadMoreDataWhenScrolled(state.entities, action.payload.data, links)
      };
    case SUCCESS(ACTION_TYPES.FETCH_WEIGHT):
      return {
        ...state,
        loading: false,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.CREATE_WEIGHT):
    case SUCCESS(ACTION_TYPES.UPDATE_WEIGHT):
      return {
        ...state,
        updating: false,
        updateSuccess: true,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.DELETE_WEIGHT):
github oktadeveloper / okta-react-native-spring-boot-example / jhipster-api / src / main / webapp / app / entities / blood-pressure / blood-pressure.reducer.ts View on Github external
return {
        ...state,
        loading: false,
        updating: false,
        updateSuccess: false,
        errorMessage: action.payload
      };
    case SUCCESS(ACTION_TYPES.SEARCH_BLOODPRESSURES):
    case SUCCESS(ACTION_TYPES.FETCH_BLOODPRESSURE_LIST):
      const links = parseHeaderForLinks(action.payload.headers.link);
      return {
        ...state,
        links,
        loading: false,
        totalItems: action.payload.headers['x-total-count'],
        entities: loadMoreDataWhenScrolled(state.entities, action.payload.data, links)
      };
    case SUCCESS(ACTION_TYPES.FETCH_BLOODPRESSURE):
      return {
        ...state,
        loading: false,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.CREATE_BLOODPRESSURE):
    case SUCCESS(ACTION_TYPES.UPDATE_BLOODPRESSURE):
      return {
        ...state,
        updating: false,
        updateSuccess: true,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.DELETE_BLOODPRESSURE):
github robmelfi / 21-points-react / src / main / webapp / app / entities / weigth / weigth.reducer.ts View on Github external
errorMessage: action.payload
      };
    case SUCCESS(ACTION_TYPES.SEARCH_WEIGTHS):
      return {
        ...state,
        loading: false,
        entities: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.FETCH_WEIGTH_LIST):
      const links = parseHeaderForLinks(action.payload.headers.link);
      return {
        ...state,
        links,
        loading: false,
        totalItems: action.payload.headers['x-total-count'],
        entities: loadMoreDataWhenScrolled(state.entities, action.payload.data, links)
      };
    case SUCCESS(ACTION_TYPES.FETCH_WEIGTH):
      return {
        ...state,
        loading: false,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.CREATE_WEIGTH):
    case SUCCESS(ACTION_TYPES.UPDATE_WEIGTH):
      return {
        ...state,
        updating: false,
        updateSuccess: true,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.DELETE_WEIGTH):
github robmelfi / 21-points-react / src / main / webapp / app / entities / blood-pressure / blood-pressure.reducer.ts View on Github external
errorMessage: action.payload
      };
    case SUCCESS(ACTION_TYPES.SEARCH_BLOODPRESSURES):
      return {
        ...state,
        loading: false,
        entities: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.FETCH_BLOODPRESSURE_LIST):
      const links = parseHeaderForLinks(action.payload.headers.link);
      return {
        ...state,
        links,
        loading: false,
        totalItems: action.payload.headers['x-total-count'],
        entities: loadMoreDataWhenScrolled(state.entities, action.payload.data, links)
      };
    case SUCCESS(ACTION_TYPES.FETCH_BLOODPRESSURE):
      return {
        ...state,
        loading: false,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.CREATE_BLOODPRESSURE):
    case SUCCESS(ACTION_TYPES.UPDATE_BLOODPRESSURE):
      return {
        ...state,
        updating: false,
        updateSuccess: true,
        entity: action.payload.data
      };
    case SUCCESS(ACTION_TYPES.DELETE_BLOODPRESSURE):