Skip to content

Commit

Permalink
communicate default index pattern when editor loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomThomson committed Oct 25, 2021
1 parent 6a22451 commit 497c057
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export const OptionsListEditor = ({
const dataViewListItems = await getIdsWithTitle();
const initialId = initialInput?.dataViewId ?? (await getDefaultId());
let dataView: DataView | undefined;
if (initialId) dataView = await get(initialId);
if (initialId) {
onChange({ dataViewId: initialId });
dataView = await get(initialId);
}
if (!mounted) return;
setState((s) => ({ ...s, dataView, dataViewListItems }));
})();
Expand Down

0 comments on commit 497c057

Please sign in to comment.