D
D
Danila2021-12-29 15:16:53
JavaScript
Danila, 2021-12-29 15:16:53

How to change the selected value?

I'm trying to change selected to false, but it doesn't change.

<Tabs id="choose-select">
  <TabsItem after={<Counter size="s" mode="primary" id="mamonts-count">2</Counter>} selected="true">Твои мамонты</TabsItem>
  <TabsItem id="mamonts-top" selected="false">Топ скамеров</TabsItem>
</Tabs>

tried to change like this:
document.getElementById('mamonts-count').selected = false;
document.getElementById('mamonts-top').selected = true;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danny Arty, 2021-12-29
@DanArst

document.getElementById('mamonts-count').setAttribute("selected", "false");
document.getElementById('mamonts-top').setAttribute("selected", "true");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question