I want to perform an asynchronous action inside a command, but I can't figure out how to close the pallet once the action is complete.
export function AppCommandPalette () {
const commands = [
{
name: 'Do Something',
command() {
doSomething().then(() => {
doSomethingToCloseTheModalHere();
});
},
},
];
return (
<CommandPalette commands={commands} resetInputOnOpen={true} />
);
}