mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Support multiple onBeforeHooks per entity
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
c8631346ca
commit
44a8824635
@ -55,15 +55,15 @@ export class CatalogEntityRegistry {
|
|||||||
* @param onBeforeRun The function that should return a boolean if the onBeforeRun of catalog entity should be triggered.
|
* @param onBeforeRun The function that should return a boolean if the onBeforeRun of catalog entity should be triggered.
|
||||||
* @returns A function to remove that hook
|
* @returns A function to remove that hook
|
||||||
*/
|
*/
|
||||||
addOnBeforeRun(catalogEntityUid: CatalogEntity["metadata"]["uid"], onBeforeRun: CatalogEntityOnBeforeRun) {
|
addOnBeforeRun(entity: CatalogEntity, onBeforeRun: CatalogEntityOnBeforeRun) {
|
||||||
return registry.addOnBeforeRun(catalogEntityUid, onBeforeRun);
|
return registry.addOnBeforeRun(entity, onBeforeRun);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns one catalog entity onBeforeRun by catalog entity uid
|
* Returns one catalog entity onBeforeRun by catalog entity uid
|
||||||
*/
|
*/
|
||||||
onBeforeRun(catalogEntityUid: CatalogEntity["metadata"]["uid"]): CatalogEntityOnBeforeRun | undefined {
|
onBeforeRun(entity: CatalogEntity): Promise<boolean> {
|
||||||
return registry.getOnBeforeRun(catalogEntityUid);
|
return registry.onBeforeRun(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { computed, observable, makeObservable, action } from "mobx";
|
import { computed, observable, makeObservable, action, ObservableSet } from "mobx";
|
||||||
import { ipcRendererOn } from "../../common/ipc";
|
import { ipcRendererOn } from "../../common/ipc";
|
||||||
import { CatalogCategory, CatalogEntity, CatalogEntityData, catalogCategoryRegistry, CatalogCategoryRegistry, CatalogEntityKindData } from "../../common/catalog";
|
import { CatalogCategory, CatalogEntity, CatalogEntityData, catalogCategoryRegistry, CatalogCategoryRegistry, CatalogEntityKindData } from "../../common/catalog";
|
||||||
import "../../common/catalog-entities";
|
import "../../common/catalog-entities";
|
||||||
@ -27,6 +27,8 @@ import type { Cluster } from "../../main/cluster";
|
|||||||
import { ClusterStore } from "../../common/cluster-store";
|
import { ClusterStore } from "../../common/cluster-store";
|
||||||
import { Disposer, iter } from "../utils";
|
import { Disposer, iter } from "../utils";
|
||||||
import { once } from "lodash";
|
import { once } from "lodash";
|
||||||
|
import logger from "../../common/logger";
|
||||||
|
import { catalogEntityRunContext } from "./catalog-entity";
|
||||||
|
|
||||||
export type EntityFilter = (entity: CatalogEntity) => any;
|
export type EntityFilter = (entity: CatalogEntity) => any;
|
||||||
export type CatalogEntityOnBeforeRun = (entity: CatalogEntity) => boolean | Promise<boolean>;
|
export type CatalogEntityOnBeforeRun = (entity: CatalogEntity) => boolean | Promise<boolean>;
|
||||||
@ -39,7 +41,7 @@ export class CatalogEntityRegistry {
|
|||||||
protected filters = observable.set<EntityFilter>([], {
|
protected filters = observable.set<EntityFilter>([], {
|
||||||
deep: false,
|
deep: false,
|
||||||
});
|
});
|
||||||
protected entityOnBeforeRun = observable.map<CatalogEntityUid, CatalogEntityOnBeforeRun>({}, {
|
protected onBeforeRunHooks = observable.map<CatalogEntityUid, ObservableSet<CatalogEntityOnBeforeRun>>({}, {
|
||||||
deep: false,
|
deep: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -177,22 +179,62 @@ export class CatalogEntityRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a onRun hook to a catalog entity.
|
* Add a onRun hook to a catalog entity. If `onBeforeRun` was previously added then it will not be added again
|
||||||
* @param uid The uid of the catalog entity
|
* @param catalogEntityUid The uid of the catalog entity
|
||||||
* @param onBeforeRun The function that should return a boolean if the onRun of catalog entity should be triggered.
|
* @param onBeforeRun The function that should return a boolean if the onRun of catalog entity should be triggered.
|
||||||
* @returns A function to remove that hook
|
* @returns A function to remove that hook
|
||||||
*/
|
*/
|
||||||
addOnBeforeRun(catalogEntityUid: CatalogEntityUid, onBeforeRun: CatalogEntityOnBeforeRun): Disposer {
|
addOnBeforeRun(entityOrId: CatalogEntity | CatalogEntityUid, onBeforeRun: CatalogEntityOnBeforeRun): Disposer {
|
||||||
this.entityOnBeforeRun.set(catalogEntityUid, onBeforeRun);
|
const id = typeof entityOrId === "string"
|
||||||
|
? entityOrId
|
||||||
|
: entityOrId.getId();
|
||||||
|
const hooks = this.onBeforeRunHooks.get(id) ??
|
||||||
|
this.onBeforeRunHooks.set(id, observable.set([], { deep: false })).get(id);
|
||||||
|
|
||||||
|
hooks.add(onBeforeRun);
|
||||||
|
|
||||||
return once(() => void this.entityOnBeforeRun.delete(catalogEntityUid));
|
return once(() => void hooks.delete(onBeforeRun));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns one catalog entity onBeforeRun by catalog entity uid
|
* Runs all the registered `onBeforeRun` hooks, short circuiting on the first falsy returned/resolved valued
|
||||||
|
* @param entity The entity to run the hooks on
|
||||||
|
* @returns Whether the entities `onRun` method should be executed
|
||||||
*/
|
*/
|
||||||
getOnBeforeRun(catalogEntityUid: CatalogEntityUid): CatalogEntityOnBeforeRun | undefined {
|
async onBeforeRun(entity: CatalogEntity): Promise<boolean> {
|
||||||
return this.entityOnBeforeRun.get(catalogEntityUid);
|
const hooks = this.onBeforeRunHooks.get(entity.getId());
|
||||||
|
|
||||||
|
if (!hooks) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const onBeforeRun of hooks) {
|
||||||
|
try {
|
||||||
|
if (!await onBeforeRun(entity)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logger.warn(`[CATALOG-ENTITY-REGISTRY]: entity ${entity.getId()} onBeforeRun threw an error`, error);
|
||||||
|
|
||||||
|
// If a handler throws treat it as if it has returned `false`
|
||||||
|
// Namely: assume that its internal logic has failed and didn't complete as expected
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRun(entity: CatalogEntity): void {
|
||||||
|
this.onBeforeRun(entity)
|
||||||
|
.then(doOnRun => {
|
||||||
|
if (doOnRun) {
|
||||||
|
return entity.onRun(catalogEntityRunContext);
|
||||||
|
} else {
|
||||||
|
logger.debug(`onBeforeRun for ${entity.getId()} returned false`);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => logger.error(`[CATALOG-ENTITY-REGISTRY]: entity ${entity.getId()} onRun threw an error`, error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,19 +22,15 @@ import styles from "./catalog.module.css";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { action, computed } from "mobx";
|
import { action, computed } from "mobx";
|
||||||
import type { CatalogEntity, CatalogEntityActionContext } from "../../api/catalog-entity";
|
import type { CatalogEntity, CatalogEntityActionContext } from "../../api/catalog-entity";
|
||||||
import type { CatalogEntityOnBeforeRun } from "../../api/catalog-entity-registry";
|
|
||||||
import type { ItemObject } from "../../../common/item.store";
|
import type { ItemObject } from "../../../common/item.store";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { navigation } from "../../navigation";
|
import { navigation } from "../../navigation";
|
||||||
import { searchUrlParam } from "../input";
|
import { searchUrlParam } from "../input";
|
||||||
import { makeCss } from "../../../common/utils/makeCss";
|
import { makeCss } from "../../../common/utils/makeCss";
|
||||||
import { KubeObject } from "../../../common/k8s-api/kube-object";
|
import { KubeObject } from "../../../common/k8s-api/kube-object";
|
||||||
import { toJS } from "mobx";
|
|
||||||
|
|
||||||
const css = makeCss(styles);
|
const css = makeCss(styles);
|
||||||
|
|
||||||
const isPromise = (obj: any): obj is Promise<any> => (obj?.then && typeof obj?.then === "function") ? true: false;
|
|
||||||
|
|
||||||
export class CatalogEntityItem<T extends CatalogEntity> implements ItemObject {
|
export class CatalogEntityItem<T extends CatalogEntity> implements ItemObject {
|
||||||
constructor(public entity: T) {}
|
constructor(public entity: T) {}
|
||||||
|
|
||||||
@ -106,32 +102,8 @@ export class CatalogEntityItem<T extends CatalogEntity> implements ItemObject {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
onRun(onBeforeRun: CatalogEntityOnBeforeRun | undefined, ctx: CatalogEntityActionContext) {
|
onRun(ctx: CatalogEntityActionContext) {
|
||||||
if (!onBeforeRun) {
|
this.entity.onRun(ctx);
|
||||||
this.entity.onRun(ctx);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof onBeforeRun === "function") {
|
|
||||||
let shouldRun;
|
|
||||||
|
|
||||||
try {
|
|
||||||
shouldRun = onBeforeRun(toJS(this.entity));
|
|
||||||
} catch (error) {
|
|
||||||
if (process?.env?.NODE_ENV !== "test") console.warn(`[CATALOG-ENTITY-ITEM] onBeforeRun of entity.metadata.uid ${this.entity?.metadata?.uid} throw an exception, stop before onRun`, error);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isPromise(shouldRun)) {
|
|
||||||
Promise.resolve(shouldRun).then((shouldRun) => {
|
|
||||||
if (shouldRun) this.entity.onRun(ctx);
|
|
||||||
}).catch((error) => {
|
|
||||||
if (process?.env?.NODE_ENV !== "test") console.warn(`[CATALOG-ENTITY-ITEM] onBeforeRun of entity.metadata.uid ${this.entity?.metadata?.uid} rejects, stop before onRun`, error);
|
|
||||||
});
|
|
||||||
} else if (shouldRun) {
|
|
||||||
this.entity.onRun(ctx);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|||||||
@ -19,28 +19,19 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { computed, IReactionDisposer, makeObservable, observable, reaction } from "mobx";
|
import { computed, makeObservable, observable, reaction } from "mobx";
|
||||||
import { catalogEntityRegistry as _catalogEntityRegistry, CatalogEntityRegistry } from "../../api/catalog-entity-registry";
|
import { catalogEntityRegistry, CatalogEntityRegistry } from "../../api/catalog-entity-registry";
|
||||||
import type { CatalogEntity } from "../../api/catalog-entity";
|
import type { CatalogEntity } from "../../api/catalog-entity";
|
||||||
import type { CatalogEntityOnBeforeRun } from "../../api/catalog-entity-registry";
|
|
||||||
import { ItemStore } from "../../../common/item.store";
|
import { ItemStore } from "../../../common/item.store";
|
||||||
import { CatalogCategory, catalogCategoryRegistry } from "../../../common/catalog";
|
import { CatalogCategory, catalogCategoryRegistry } from "../../../common/catalog";
|
||||||
import { autoBind } from "../../../common/utils";
|
import { autoBind, disposer } from "../../../common/utils";
|
||||||
import { CatalogEntityItem } from "./catalog-entity-item";
|
import { CatalogEntityItem } from "./catalog-entity-item";
|
||||||
|
|
||||||
export class CatalogEntityStore extends ItemStore<CatalogEntityItem<CatalogEntity>> {
|
export class CatalogEntityStore extends ItemStore<CatalogEntityItem<CatalogEntity>> {
|
||||||
#catalogEntityRegistry: CatalogEntityRegistry;
|
constructor(private registry: CatalogEntityRegistry = catalogEntityRegistry) {
|
||||||
|
|
||||||
constructor(catalogEntityRegistry?: CatalogEntityRegistry) {
|
|
||||||
super();
|
super();
|
||||||
makeObservable(this);
|
makeObservable(this);
|
||||||
autoBind(this);
|
autoBind(this);
|
||||||
|
|
||||||
if (catalogEntityRegistry) {
|
|
||||||
this.#catalogEntityRegistry = catalogEntityRegistry;
|
|
||||||
} else {
|
|
||||||
this.#catalogEntityRegistry = _catalogEntityRegistry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@observable activeCategory?: CatalogCategory;
|
@observable activeCategory?: CatalogCategory;
|
||||||
@ -48,27 +39,25 @@ export class CatalogEntityStore extends ItemStore<CatalogEntityItem<CatalogEntit
|
|||||||
|
|
||||||
@computed get entities() {
|
@computed get entities() {
|
||||||
if (!this.activeCategory) {
|
if (!this.activeCategory) {
|
||||||
return this.#catalogEntityRegistry.filteredItems.map(entity => new CatalogEntityItem(entity));
|
return this.registry.filteredItems.map(entity => new CatalogEntityItem(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.#catalogEntityRegistry.getItemsForCategory(this.activeCategory, { filtered: true }).map(entity => new CatalogEntityItem(entity));
|
return this.registry.getItemsForCategory(this.activeCategory, { filtered: true }).map(entity => new CatalogEntityItem(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
@computed get selectedItem() {
|
@computed get selectedItem() {
|
||||||
return this.entities.find(e => e.getId() === this.selectedItemId);
|
return this.entities.find(e => e.getId() === this.selectedItemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCatalogEntityOnBeforeRun(catalogEntityUid: CatalogEntity["metadata"]["uid"]): CatalogEntityOnBeforeRun | undefined {
|
onRun(entity: CatalogEntity): void {
|
||||||
return this.#catalogEntityRegistry.getOnBeforeRun(catalogEntityUid);
|
this.registry.onRun(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch() {
|
watch() {
|
||||||
const disposers: IReactionDisposer[] = [
|
return disposer(
|
||||||
reaction(() => this.entities, () => this.loadAll()),
|
reaction(() => this.entities, () => this.loadAll()),
|
||||||
reaction(() => this.activeCategory, () => this.loadAll(), { delay: 100})
|
reaction(() => this.activeCategory, () => this.loadAll(), { delay: 100}),
|
||||||
];
|
);
|
||||||
|
|
||||||
return () => disposers.forEach((dispose) => dispose());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAll() {
|
loadAll() {
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import { CatalogEntityStore } from "./catalog-entity.store";
|
|||||||
import type { CatalogEntityItem } from "./catalog-entity-item";
|
import type { CatalogEntityItem } from "./catalog-entity-item";
|
||||||
import { navigate } from "../../navigation";
|
import { navigate } from "../../navigation";
|
||||||
import { MenuItem, MenuActions } from "../menu";
|
import { MenuItem, MenuActions } from "../menu";
|
||||||
import { CatalogEntityContextMenu, CatalogEntityContextMenuContext, catalogEntityRunContext } from "../../api/catalog-entity";
|
import type { CatalogEntityContextMenu, CatalogEntityContextMenuContext } from "../../api/catalog-entity";
|
||||||
import { HotbarStore } from "../../../common/hotbar-store";
|
import { HotbarStore } from "../../../common/hotbar-store";
|
||||||
import { ConfirmDialog } from "../confirm-dialog";
|
import { ConfirmDialog } from "../confirm-dialog";
|
||||||
import { catalogCategoryRegistry, CatalogEntity } from "../../../common/catalog";
|
import { catalogCategoryRegistry, CatalogEntity } from "../../../common/catalog";
|
||||||
@ -133,16 +133,12 @@ export class Catalog extends React.Component<Props> {
|
|||||||
if (this.catalogEntityStore.selectedItemId) {
|
if (this.catalogEntityStore.selectedItemId) {
|
||||||
this.catalogEntityStore.selectedItemId = null;
|
this.catalogEntityStore.selectedItemId = null;
|
||||||
} else {
|
} else {
|
||||||
const onBeforeRun = this.catalogEntityStore.getCatalogEntityOnBeforeRun(item.entity.metadata.uid);
|
this.catalogEntityStore.onRun(item.entity);
|
||||||
|
|
||||||
item.onRun(onBeforeRun, catalogEntityRunContext);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onClickDetailPanelIcon = (item: CatalogEntityItem<CatalogEntity>) => {
|
onClickDetailPanelIcon = (item: CatalogEntityItem<CatalogEntity>) => {
|
||||||
const onBeforeRun = this.catalogEntityStore.getCatalogEntityOnBeforeRun(item.entity.metadata.uid);
|
this.catalogEntityStore.onRun(item.entity);
|
||||||
|
|
||||||
item.onRun(onBeforeRun, catalogEntityRunContext);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onMenuItemClick(menuItem: CatalogEntityContextMenu) {
|
onMenuItemClick(menuItem: CatalogEntityContextMenu) {
|
||||||
|
|||||||
@ -26,22 +26,18 @@ import { observer } from "mobx-react";
|
|||||||
import { HotbarEntityIcon } from "./hotbar-entity-icon";
|
import { HotbarEntityIcon } from "./hotbar-entity-icon";
|
||||||
import { cssNames, IClassName } from "../../utils";
|
import { cssNames, IClassName } from "../../utils";
|
||||||
import { catalogEntityRegistry } from "../../api/catalog-entity-registry";
|
import { catalogEntityRegistry } from "../../api/catalog-entity-registry";
|
||||||
import type { CatalogEntityOnBeforeRun} from "../../api/catalog-entity-registry";
|
|
||||||
import { HotbarStore } from "../../../common/hotbar-store";
|
import { HotbarStore } from "../../../common/hotbar-store";
|
||||||
import { CatalogEntity, catalogEntityRunContext } from "../../api/catalog-entity";
|
import type { CatalogEntity } from "../../api/catalog-entity";
|
||||||
import { DragDropContext, Draggable, Droppable, DropResult } from "react-beautiful-dnd";
|
import { DragDropContext, Draggable, Droppable, DropResult } from "react-beautiful-dnd";
|
||||||
import { HotbarSelector } from "./hotbar-selector";
|
import { HotbarSelector } from "./hotbar-selector";
|
||||||
import { HotbarCell } from "./hotbar-cell";
|
import { HotbarCell } from "./hotbar-cell";
|
||||||
import { HotbarIcon } from "./hotbar-icon";
|
import { HotbarIcon } from "./hotbar-icon";
|
||||||
import { defaultHotbarCells, HotbarItem } from "../../../common/hotbar-types";
|
import { defaultHotbarCells, HotbarItem } from "../../../common/hotbar-types";
|
||||||
import { toJS } from "mobx";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
className?: IClassName;
|
className?: IClassName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isPromise = (obj: any): obj is Promise<any> => (obj?.then && typeof obj?.then === "function") ? true: false;
|
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class HotbarMenu extends React.Component<Props> {
|
export class HotbarMenu extends React.Component<Props> {
|
||||||
get hotbar() {
|
get hotbar() {
|
||||||
@ -58,10 +54,6 @@ export class HotbarMenu extends React.Component<Props> {
|
|||||||
return catalogEntityRegistry.getById(item?.entity.uid) ?? null;
|
return catalogEntityRegistry.getById(item?.entity.uid) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getEntityOnBeforeRun(uid: string): CatalogEntityOnBeforeRun | undefined {
|
|
||||||
return catalogEntityRegistry.getOnBeforeRun(uid);
|
|
||||||
}
|
|
||||||
|
|
||||||
onDragEnd(result: DropResult) {
|
onDragEnd(result: DropResult) {
|
||||||
const { source, destination } = result;
|
const { source, destination } = result;
|
||||||
|
|
||||||
@ -132,35 +124,7 @@ export class HotbarMenu extends React.Component<Props> {
|
|||||||
key={index}
|
key={index}
|
||||||
index={index}
|
index={index}
|
||||||
entity={entity}
|
entity={entity}
|
||||||
onClick={() => {
|
onClick={() => catalogEntityRegistry.onRun(entity)}
|
||||||
const onBeforeRun = this.getEntityOnBeforeRun(entity.metadata.uid);
|
|
||||||
|
|
||||||
if (!onBeforeRun) {
|
|
||||||
entity.onRun(catalogEntityRunContext);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof onBeforeRun === "function") {
|
|
||||||
let shouldRun;
|
|
||||||
|
|
||||||
try {
|
|
||||||
shouldRun = onBeforeRun(toJS(entity));
|
|
||||||
} catch (error) {
|
|
||||||
if (process?.env?.NODE_ENV !== "test") console.warn(`[HOT-BAR] onBeforeRun of entity.metadata.uid ${entity?.metadata?.uid} throw an exception, stop before onRun`, error);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isPromise(shouldRun)) {
|
|
||||||
Promise.resolve(shouldRun).then((shouldRun) => {
|
|
||||||
if (shouldRun) entity.onRun(catalogEntityRunContext);
|
|
||||||
}).catch((error) => {
|
|
||||||
if (process?.env?.NODE_ENV !== "test") console.warn(`[HOT-BAR] onBeforeRun of entity.metadata.uid ${entity?.metadata?.uid} rejects, stop before onRun`, error);
|
|
||||||
});
|
|
||||||
} else if (shouldRun) {
|
|
||||||
entity.onRun(catalogEntityRunContext);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
className={cssNames({ isDragging: snapshot.isDragging })}
|
className={cssNames({ isDragging: snapshot.isDragging })}
|
||||||
remove={this.removeItem}
|
remove={this.removeItem}
|
||||||
add={this.addItem}
|
add={this.addItem}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user