Coffee
  • Tea
  • Milk
  • Coffee
  • Tea
  • Milk
  • Coffee
  • Tea
  • Milk
  • Material UI List, how do I "renumber" the list (eg 1,2,5,6,7,8... renumbering 3 -> 5)?

    36 Views Asked by At

    In html list I can code:

    <!DOCTYPE html>
    <html>
    <body>
    
    <h1>The li value attribute</h1>
    
    <ol>
      <li value="100">Coffee</li>
      <li>Tea</li>
      <li>Milk</li>
      <li value="200">Water</li>
      <li>Juice</li>
      <li>Beer</li>
    </ol>
    
    </body>
    </html>
    

    The numbering are skipped:

    enter image description here

    How do I do that in Material ui List ? I've tried sending in the value in sx but it does not work and I cannot find an option in ListItem that is eqivalent to value in html list.

    Thanks.

    Update: Thought value is not found in the Material UI API at https://mui.com/material-ui/api/list-item/, I added it and I manage to "renumber" the list.

    Thanks for reading.

    1

    There are 1 best solutions below

    0
    EBDS On

    Update: Thought value is not found in the Material UI API at https://mui.com/material-ui/api/list-item/, I added it and I manage to "renumber" the list.