mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Rename addById to addByUID (#72527)
This commit is contained in:
parent
ca946582b1
commit
331a4297bb
@ -24,7 +24,7 @@ export const PlaylistForm = ({ onSubmit, playlist }: Props) => {
|
||||
return () => getGrafanaSearcher().tags({ kind: ['dashboard'] });
|
||||
}, []);
|
||||
|
||||
const { items, addById, addByTag, deleteItem, moveItem } = usePlaylistItems(propItems);
|
||||
const { items, addByUID, addByTag, deleteItem, moveItem } = usePlaylistItems(propItems);
|
||||
|
||||
const doSubmit = (list: Playlist) => {
|
||||
setSaving(true);
|
||||
@ -63,7 +63,7 @@ export const PlaylistForm = ({ onSubmit, playlist }: Props) => {
|
||||
<h3 className="page-headering">Add dashboards</h3>
|
||||
|
||||
<Field label="Add by title">
|
||||
<DashboardPicker id="dashboard-picker" onChange={addById} key={items.length} />
|
||||
<DashboardPicker id="dashboard-picker" onChange={addByUID} key={items.length} />
|
||||
</Field>
|
||||
|
||||
<Field label="Add by tag">
|
||||
|
@ -19,7 +19,7 @@ export function usePlaylistItems(playlistItems?: PlaylistItem[]) {
|
||||
}
|
||||
}, [items]);
|
||||
|
||||
const addById = useCallback(
|
||||
const addByUID = useCallback(
|
||||
(dashboard?: DashboardPickerDTO) => {
|
||||
if (!dashboard) {
|
||||
return;
|
||||
@ -74,5 +74,5 @@ export function usePlaylistItems(playlistItems?: PlaylistItem[]) {
|
||||
[items]
|
||||
);
|
||||
|
||||
return { items, addById, addByTag, deleteItem, moveItem };
|
||||
return { items, addByUID, addByTag, deleteItem, moveItem };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user