Skip to content

bug: reorderArray is not exported #18016

Closed

Description

@jasonwirth

Bug Report

Ionic version:

[x] 4.x

Current behavior:

reorderArray utility function isn't exported.

On a side note, in this file the enum has a typo... const enum ReordeGroupState {... Should probably be ReorderGroupState

Expected behavior:

export the function

Steps to reproduce:

Github Source

Related code:

In Ionic-v3 the function was exportable:

import { reorderArray } from 'ionic-angular';

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/usr/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.2.0
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.4.1

System:

   NodeJS : v11.13.0 (/usr/bin/node)
   npm    : 6.9.0
   OS     : Linux 4.4

Activity

  1. added a commit that references this issue on Apr 11, 2019
  2. liamdebeasi commented on Apr 11, 2019

    @liamdebeasi
    Contributor

    Hi there,

    As per the ion-reorder-group Documentation you can provide your array to the complete method and it will return the array re-ordered:

    this.dataList = reorderGroup.complete(this.dataList);
    

    The reorderArray function in the framework is not supposed to be exported since you can just use it via the complete method.

    I think the vanilla JS example with

    this.dataList = reorderArray(this.dataList, ev.detail.from, ev.detail.to);
    ev.detail.complete();
    

    either is outdated or (confusingly) implies that you already had a reorderArray function.

    Does this resolve your issue?

    Thanks!

  3. added
    needs: reply
    on Apr 11, 2019
  4. ionitron-bot commented on May 16, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  5. locked and limited conversation to collaborators on May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: reply

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions