mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(item): sliding items work with list reorder
This commit is contained in:
@@ -175,3 +175,11 @@ export function getQuerystring(url: string): any {
|
||||
}
|
||||
return queryParams;
|
||||
}
|
||||
|
||||
|
||||
export function reorderArray(array: any[], indexes: {from: number, to: number}): any[] {
|
||||
let element = array[indexes.from];
|
||||
array.splice(indexes.from, 1);
|
||||
array.splice(indexes.to, 0, element);
|
||||
return array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user