mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
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:
committed by
Tim Abbott
parent
0a9678980f
commit
a2c7f35e5c
@@ -24,6 +24,7 @@ export function create_item_from_stream_name(stream_name, current_items) {
|
||||
}
|
||||
|
||||
const item = {
|
||||
type: "stream",
|
||||
display_value: display_pill(sub),
|
||||
stream_id: sub.stream_id,
|
||||
stream_name: sub.name,
|
||||
@@ -58,6 +59,7 @@ export function get_user_ids(pill_widget) {
|
||||
|
||||
export function append_stream(stream, pill_widget) {
|
||||
pill_widget.appendValidatedData({
|
||||
type: "stream",
|
||||
display_value: display_pill(stream),
|
||||
stream_id: stream.stream_id,
|
||||
stream_name: stream.name,
|
||||
|
||||
Reference in New Issue
Block a user