Skip to content

Instantly share code, notes, and snippets.

@vadimkibana
Created August 8, 2023 13:59
Show Gist options
  • Save vadimkibana/97e9b9bfdddf3e25bbd2203296270d5a to your computer and use it in GitHub Desktop.
Save vadimkibana/97e9b9bfdddf3e25bbd2203296270d5a to your computer and use it in GitHub Desktop.
const ListingPage = () => {
  <TableListViewKibanaProvider {...deps}>
    <TableListViewPage>
      <TableListViewPage.Header title="" />
      <TableListView.Table type="dashboards" {...props} />
    </TableListViewPage>
  </TableListViewKibanaProvider>;
};
@vadimkibana
Copy link
Author

vadimkibana commented Aug 8, 2023

old way:

<TableListView fetchItem={...} delteItem={...} {...} />

// internal:

const [cache, setCache] = React.useState();
data = props.fetchItems()
setCache(data);

new way:

<TableListView.Table type="dashboards" />

// internal:

const cache = contentManagmenet.useItems('dashboards');

Q: is react-query cache global (across Kibana apps)?

@vadimkibana
Copy link
Author

vadimkibana commented Aug 8, 2023

UI Actions

Context: content item, { id: 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxx-xxxx', contentType: 'dashboards', title: 'My Dashboard' }

Trigger: cm_item

Actions:

  • view
  • delete
  • download
  • ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment