olton / Metro-UI-CSS

Impressive component library for expressive web development! Build responsive projects on the web with the first front-end component library in Metro Style. And now there are even more opportunities every day!
http://metroui.org.ua/
MIT License
7.04k stars 1.96k forks source link

Table Checkbox sort #1907

Open nevusK opened 1 year ago

nevusK commented 1 year ago

I am new to HTML and github, sorry if I make a mistake in following any protocol. It would be nice if a table could be sorted based on the checkbox column. It would be very helpful if all checked items are dynamically shown at the top of the table.

Thank you very much for this great Metro UI!

This is my sample code, just to give you an idea how my table is configured. The items are set using script from an external source by database.setItems(values) method.

`

  <table id="meds" class="table compact striped row-border row-hover table-border mt-12"
        data-role="table"
        data-rows="6"            
        data-show-activity="false"
        data-check="true"
        data-show-rows-steps="false"
        data-show-table-info="false"
        data-table-search-title="Add medicines"
        data-show-pagination="false"
        data-search-fields="Name, Class, Company"            
        data-check-name="chkBox"
        data-on-check-click="checkClick()"
        data-search-wrapper=".my-search-wrapper"         
         >

  <thead>
    <tr>

        <th  >Name</th>
        <th data-show="false" >Dose</th>
        <th data-show="false" >Freq</th>
        <th data-show="false" >Instructions</th>
        <th  >Class</th>
        <th  >Company</th>           
    </tr>
  </thead>

  <tbody>
    <!----body---->        
  </tbody>
</table>

`

pragyamishra56 commented 1 year ago

@nevusK If it would be possible then can you assign me to this issue I want to resolve this would be my first contribution

nevusK commented 9 months ago

@pragyamishra56 It seems that I cannot assign this issue to you. Maybe if you tag the admin / owner of this repository @olton , they might be able to assign it to you.

olton commented 9 months ago

Hi, you can create a pull request (to dev branch) with required changes.