mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 00:25:46 -06:00
* feat(dashboardsettings): migrate dashboard links EmptyListCTA to react * feat(dashboardsettings): initial commit of links settings migration to react * feat(dashboardsettings): add links form functionality * refactor(dashboardsettings): separate out linksettings components and concerns * Updates to links list * Form improvements * test(dashboardlinks): update links so tests run * refactor: move _.move to arrayMove for testing purposes * test(dashboardsettings): initial commit of link settings tests * refactor(app): put back lodash move method for backwards compatibility * test(dashboardsettings): add links settings tests * style(dashboardsettings): camelcase constants * chore(dashboardsettings): delete old angular links settings view * fix(dashboardsettings): forceupdate links on submenuVisibilityChanged and correct imports * chore: remove reference to old angular link settings components Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
5 lines
165 B
TypeScript
5 lines
165 B
TypeScript
export const arrayMove = <T>(array: T[], fromIndex: number, toIndex: number): T[] => {
|
|
array.splice(toIndex, 0, array.splice(fromIndex, 1)[0]);
|
|
return array;
|
|
};
|