mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
feat(reorder): adds ion-reorder-group to core
This commit is contained in:
@ -268,3 +268,13 @@ export function hasFocusedTextInput() {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export function reorderArray(array: any[], indexes: {from: number, to: number}): any[] {
|
||||
const element = array[indexes.from];
|
||||
array.splice(indexes.from, 1);
|
||||
array.splice(indexes.to, 0, element);
|
||||
return array;
|
||||
}
|
||||
|
Reference in New Issue
Block a user