MCPcopy Create free account
hub / github.com/ElemeFE/element-react / select

Method select

src/cascader/Menu.jsx:51–65  ·  view source on GitHub ↗
(item: any, menuIndex: number)

Source from the content-addressed store, hash-verified

49 }
50
51 select(item: any, menuIndex: number) {
52 let {activeValue} = this.state
53 if (item.__IS__FLAT__OPTIONS) {
54 activeValue = item.value;
55 } else {
56 if (!menuIndex) {
57 activeValue = [item.value];
58 } else {
59 activeValue.splice(menuIndex, activeValue.length - 1, item.value);
60 }
61 }
62
63 this.forceUpdate();
64 this.parent().handlePick(activeValue);
65 }
66
67 handleMenuLeave() {
68 }

Callers 1

renderMethod · 0.95

Calls 2

parentMethod · 0.95
handlePickMethod · 0.80

Tested by

no test coverage detected