Question: hello every one I am trying to get a specific element in my table and add a class to it to make the red buttons green when an image is uploaded. But i can't get the specific row in my table. Any one a solution for this?

My code:

```
  <b-table hover
           :filter="filter"
           id="my-table"
           :bordered="bordered"
           :fields="fields"
           :items="items"
           :per-page="perPage"
           :current-page="currentPage"
           responsive
           striped
           small>
    <template v-slot:cell(actions)="row">
      <b-button id="btnImage" size="sm" @click="info(row.item, $event.target)" class="addModal mr-2" ref="addModal">
        <font-awesome-icon :icon="['fas', 'image' ]" />
      </b-button>
    </template>
  </b-table>

```

If i do this: var tr = document.getElementById("my-table").getElementsByTagName("tr"); I get the following output:
[![enter image description here](https://i.stack.imgur.com/LFpWe.png)](https://i.stack.imgur.com/LFpWe.png)

inside every tr is an element thats called innerText that reference to the id that you can see here in my table:[![enter image description here](https://i.stack.imgur.com/1iYQj.png)](https://i.stack.imgur.com/1iYQj.png)

But how do i get the specific row in my table and add an class to the button of that specific row?

Answer: 
A possible solution is to use `TabView` selection to activate sheet programmatically, but do not actually allow this selection to be changed (tested with Xcode 12 / iOS 14).

Update: retested with Xcode 13.4 / iOS 15.5

[![demo](https://i.stack.imgur.com/mAm9A.gif)](https://i.stack.imgur.com/mAm9A.gif)

```
struct ContentView: View {
    @State var isPresenting = false
    @State private var selectedItem = 1
    @State private var oldSelectedItem = 1

    var body: some View {
        TabView(selection: $selectedItem){
            Text("1")
                .tabItem {
                        Image(systemName: "house")
                }.tag(1)

            Text("")    // I want this to display the sheet.
                .tabItem { Image(systemName: "plus.circle") }
                .tag(2)

            Text("3")
                .tabItem {
                    Image(systemName: "calendar")
                }.tag(3)
        }
     //   .onReceive(Just(selectedItem))  // SwiftUI 1.0 - import Combine for this
        .onChange(of: selectedItem) {    // SwiftUI 2.0 track changes
                if 2 == selectedItem {
                self.isPresenting = true
                } else {
                    self.oldSelectedItem = $0
                }
            }
        .sheet(isPresented: $isPresenting, onDismiss: {
                self.selectedItem = self.oldSelectedItem
            }) {
            testSheet
        }
        .accentColor(Color.orange)

    }
    var testSheet : some View {
        VStack{
            Text("testing")
        }
    }
}

```
Add the code below to your TabView

```
    .onChange(of: selectedItem) { newValue in
        if(newValue == 2){
            isPresenting = true
            selectedItem = oldSelectedItem
        }else{
            oldSelectedItem = newValue
        }
    }.sheet(isPresented: $isPresenting) {
       //sheet view
    }

```