Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

input_pill: Allow removeAllPills to be called with quiet=true.

evykassirer651033000336
diff --git a/web/src/input_pill.ts b/web/src/input_pill.ts
index 53f08d4279f..b71f7d6e3d5 100644
--- a/web/src/input_pill.ts
+++ b/web/src/input_pill.ts
@@ -91,7 +91,7 @@ export type InputPillContainer<T> = {
onPillRemove: (callback: (pill: InputPill<T>) => void) => void;
onTextInputHook: (callback: () => void) => void;
createPillonPaste: (callback: () => void) => void;
- clear: () => void;
+ clear: (quiet?: boolean) => void;
clear_text: () => void;
getCurrentText: () => string | null;
is_pending: () => boolean;
@@ -590,7 +590,9 @@ export function create<T>(opts: InputPillCreateOptions<T>): InputPillContainer<T
store.createPillonPaste = callback;
},
- clear: funcs.removeAllPills.bind(funcs),
+ clear(quiet?: boolean) {
+ funcs.removeAllPills.bind(funcs)(quiet);
+ },
clear_text: funcs.clear_text.bind(funcs),
is_pending: funcs.is_pending.bind(funcs),
_get_pills_for_testing: funcs._get_pills_for_testing.bind(funcs),