useAdaptableApi hook
Gives you access to the Adaptable API
import { useAdaptableApi } from '@adaptabletools/adaptable-infinite-react';
function YourCmp() {
const api = useAdaptableApi();
const setLightTheme = () => {
api.themeApi.setTheme('light');
};
const onClick = () => api.viewApi.setActiveView("view1")
return <>
<button onClick={onClick}>
Set "View 1" as active
</button>
<button onClick={setLightTheme}>set light theme</button>
</>
}
function App() {
return <Adaptable.Provider {...}>
<YourCmp />
<Adaptable.UI />
<