Skip to content

Remove patches for catching file browser selected items change #6890

Open
@jtpio

Description

@jtpio

Follow-up to #6888

#6888 added a few patches to be able to know when the file browser selected items change:

// TODO: use upstream signal when available to detect selection changes
// https://github.com/jupyterlab/jupyterlab/issues/14598
const selectionChanged = new Signal<FileBrowser, void>(browser);
const methods = [
'_selectItem',
'_handleMultiSelect',
'handleFileSelect',
] as const;
methods.forEach((method: (typeof methods)[number]) => {
const original = browser['listing'][method];
browser['listing'][method] = (...args: any[]) => {
original.call(browser['listing'], ...args);
selectionChanged.emit(void 0);
};
});

Ideally there should be a built-in signal emitted when this is the case. Tracked upstream in jupyterlab/jupyterlab#14598.

For this issue to be solved jupyterlab/jupyterlab#14598 would first have to be fixed and released in JupyterLab, so Notebook 7 can be updated with the latest versions of the packages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions