refactor: Add type field to pill items.

Item field is added to the pill items, this is done to utilize
it wherever possible, to distinguish between diffrent types
of pill items(stream|user_groups|users).

It is also a preparatory commit to support expanding of stream
and user group pills.
This commit is contained in:
m-e-l-u-h-a-n
2021-04-27 20:26:20 +05:30
committed by Tim Abbott
parent 0a9678980f
commit a2c7f35e5c
8 changed files with 32 additions and 1 deletions

View File

@@ -94,6 +94,11 @@ export function create(opts) {
return;
}
if (!item.type) {
blueslip.error("no type defined for the item");
return;
}
const payload = {
id,
item,