components: Convert .data("tab-id") to .attr.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-02 17:33:16 -07:00 committed by Tim Abbott
parent 153847d617
commit bc9a7ef274
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ export function toggle(opts: {
} }
meta.$ind_tab.on("click", function () { meta.$ind_tab.on("click", function () {
const idx = $(this).data("tab-id"); const idx = Number($(this).attr("data-tab-id"));
select_tab(idx); select_tab(idx);
}); });

View File

@ -33,8 +33,8 @@ function make_tab(i) {
return tokens.includes(c); return tokens.includes(c);
}; };
$self.data = (name) => { $self.attr = (name) => {
assert.equal(name, "tab-id"); assert.equal(name, "data-tab-id");
return i; return i;
}; };