How do I get the key value here when a tag is removed?
<Tag key={place.id} onRemove={this.handleRemove}>{place.city}</Tag>
this.handleRemove(e) {
//e returns a class, how do I get the key?
console.log(e);
}
"@shopify/app-bridge": "^1.19.0",
"@shopify/app-bridge-react": "^1.14.0",
"@shopify/polaris": "^4.21.0",
"@shopify/polaris-icons": "^3.8.0",
"@shopify/shopify-express": "^1.0.0-alpha.7",
Thanks,
Sam
This works!
handleRemove(place){ var tagText = $(place.currentTarget).parent()[0].innerText; } <Tag key={place.id} onRemove={this.handleRemove} children={place.city}></Tag>
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |