| 
 | 1 | +<!DOCTYPE html>  | 
 | 2 | +<html lang="en">  | 
 | 3 | +  <head>  | 
 | 4 | +    <meta charset="utf-8" />  | 
 | 5 | +    <title>Alpine-keyed</title>  | 
 | 6 | +    <link href="/css/currentStyle.css" rel="stylesheet" />  | 
 | 7 | +  </head>  | 
 | 8 | +  <body>  | 
 | 9 | +    <div class="container" id="main" x-data="app()">  | 
 | 10 | +      <div class="jumbotron">  | 
 | 11 | +        <div class="row">  | 
 | 12 | +          <div class="col-md-6">  | 
 | 13 | +            <h1>Alpine-keyed</h1>  | 
 | 14 | +          </div>  | 
 | 15 | +          <div class="col-md-6">  | 
 | 16 | +            <div class="row">  | 
 | 17 | +              <div class="col-sm-6 smallpad">  | 
 | 18 | +                <button  | 
 | 19 | +                  type="button"  | 
 | 20 | +                  class="btn btn-primary btn-block"  | 
 | 21 | +                  id="run"  | 
 | 22 | +                  @click="run"  | 
 | 23 | +                >  | 
 | 24 | +                  Create 1,000 rows  | 
 | 25 | +                </button>  | 
 | 26 | +              </div>  | 
 | 27 | +              <div class="col-sm-6 smallpad">  | 
 | 28 | +                <button  | 
 | 29 | +                  type="button"  | 
 | 30 | +                  class="btn btn-primary btn-block"  | 
 | 31 | +                  id="runlots"  | 
 | 32 | +                  @click="runLots"  | 
 | 33 | +                >  | 
 | 34 | +                  Create 10,000 rows  | 
 | 35 | +                </button>  | 
 | 36 | +              </div>  | 
 | 37 | +              <div class="col-sm-6 smallpad">  | 
 | 38 | +                <button  | 
 | 39 | +                  type="button"  | 
 | 40 | +                  class="btn btn-primary btn-block"  | 
 | 41 | +                  id="add"  | 
 | 42 | +                  @click="add"  | 
 | 43 | +                >  | 
 | 44 | +                  Append 1,000 rows  | 
 | 45 | +                </button>  | 
 | 46 | +              </div>  | 
 | 47 | +              <div class="col-sm-6 smallpad">  | 
 | 48 | +                <button  | 
 | 49 | +                  type="button"  | 
 | 50 | +                  class="btn btn-primary btn-block"  | 
 | 51 | +                  id="update"  | 
 | 52 | +                  @click="update"  | 
 | 53 | +                >  | 
 | 54 | +                  Update every 10th row  | 
 | 55 | +                </button>  | 
 | 56 | +              </div>  | 
 | 57 | +              <div class="col-sm-6 smallpad">  | 
 | 58 | +                <button  | 
 | 59 | +                  type="button"  | 
 | 60 | +                  class="btn btn-primary btn-block"  | 
 | 61 | +                  id="clear"  | 
 | 62 | +                  @click="clear"  | 
 | 63 | +                >  | 
 | 64 | +                  Clear  | 
 | 65 | +                </button>  | 
 | 66 | +              </div>  | 
 | 67 | +              <div class="col-sm-6 smallpad">  | 
 | 68 | +                <button  | 
 | 69 | +                  type="button"  | 
 | 70 | +                  class="btn btn-primary btn-block"  | 
 | 71 | +                  id="swaprows"  | 
 | 72 | +                  @click="swapRows"  | 
 | 73 | +                >  | 
 | 74 | +                  Swap Rows  | 
 | 75 | +                </button>  | 
 | 76 | +              </div>  | 
 | 77 | +            </div>  | 
 | 78 | +          </div>  | 
 | 79 | +        </div>  | 
 | 80 | +      </div>  | 
 | 81 | +      <table class="table table-hover table-striped test-data">  | 
 | 82 | +        <tbody>  | 
 | 83 | +          <template x-for="item of data" :key="item.id">  | 
 | 84 | +            <tr :class="item.id === selected ? 'danger' : ''">  | 
 | 85 | +              <td class="col-md-1" x-text="item.id"></td>  | 
 | 86 | +              <td class="col-md-4">  | 
 | 87 | +                <a @click="select(item.id)" x-text="item.label"></a>  | 
 | 88 | +              </td>  | 
 | 89 | +              <td class="col-md-1">  | 
 | 90 | +                <a @click="remove(item.id)"  | 
 | 91 | +                  ><span  | 
 | 92 | +                    class="glyphicon glyphicon-remove"  | 
 | 93 | +                    aria-hidden="true"  | 
 | 94 | +                  ></span  | 
 | 95 | +                ></a>  | 
 | 96 | +              </td>  | 
 | 97 | +              <td class="col-md-6"></td>  | 
 | 98 | +            </tr>  | 
 | 99 | +          </template>  | 
 | 100 | +        </tbody>  | 
 | 101 | +      </table>  | 
 | 102 | + | 
 | 103 | +      <span  | 
 | 104 | +        class="preloadicon glyphicon glyphicon-remove"  | 
 | 105 | +        aria-hidden="true"  | 
 | 106 | +      ></span>  | 
 | 107 | +    </div>  | 
 | 108 | + | 
 | 109 | +    <script src="dist/main.js"></script>  | 
 | 110 | +  </body>  | 
 | 111 | +</html>  | 
0 commit comments