mirror of https://github.com/zulip/zulip.git
settings_user: Pass data of correct type to `list_widget.render_item`.
Since `list_widget.render_item` accepts the parameter of type `Item` and not `Key`, therefore we should pass the actual item instead of just plain id to the `render_item` function here.
This commit is contained in:
parent
d58085dde2
commit
ad10c77919
|
@ -287,7 +287,7 @@ section.bots.create_table = () => {
|
||||||
name: "admin_bot_list",
|
name: "admin_bot_list",
|
||||||
get_item: bot_info,
|
get_item: bot_info,
|
||||||
modifier: render_admin_user_list,
|
modifier: render_admin_user_list,
|
||||||
html_selector: (item) => $(`tr[data-user-id='${CSS.escape(item)}']`),
|
html_selector: (item) => $(`tr[data-user-id='${CSS.escape(item.user_id)}']`),
|
||||||
filter: {
|
filter: {
|
||||||
$element: $bots_table.closest(".settings-section").find(".search"),
|
$element: $bots_table.closest(".settings-section").find(".search"),
|
||||||
predicate(item, value) {
|
predicate(item, value) {
|
||||||
|
@ -380,7 +380,7 @@ export function update_bot_data(bot_user_id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_list_widget.render_item(bot_user_id);
|
bot_list_widget.render_item(bot_info(bot_user_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update_user_data(user_id, new_data) {
|
export function update_user_data(user_id, new_data) {
|
||||||
|
|
Loading…
Reference in New Issue