Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add isMobile to expanded-item slot scope #8394

Closed
yariksav opened this issue Aug 8, 2019 · 1 comment · Fixed by skyYaga/skdvin-webapp#23 or anyulled/reactivewebflux#5 · May be fixed by SigmaITC/competencebyjava-front-end#8
Assignees
Labels
C: VDataTable VDatatable T: enhancement Functionality that enhances existing features

Comments

@yariksav
Copy link

yariksav commented Aug 8, 2019

Problem to solve

In mobile view of VDataTable expanded-item slot continue set colspan to headers length, and no chance to change it

      <template v-slot:expanded-item="{ headers, item }">
        <td :colspan="headers.length">
          ...
        </td>
      </template>

Proposed solution

I suppose after adding isMobile into slot scope

}, [this.$scopedSlots['expanded-item']!({ item, headers: this.computedHeaders })])

we can do like this

      <template v-slot:expanded-item="{ headers, item, isMobile }">
        <td :colspan="isMobile ? 1 : headers.length">
          <OrderInfoPanel :value="item" />
        </td>
      </template>
@ghost ghost added the S: triage label Aug 8, 2019
@jacekkarczmarczyk
Copy link
Member

Could be added to other slots as well

@jacekkarczmarczyk jacekkarczmarczyk added C: VDataTable VDatatable T: enhancement Functionality that enhances existing features and removed S: triage labels Aug 8, 2019
Logikgate pushed a commit to flypapertech/vuetify that referenced this issue Feb 19, 2020
… scope (vuetifyjs#10345)

fixes vuetifyjs#8394
fixes vuetifyjs#9436

* fix(vdatatable): add isMobile property to custom item slot scop in DataTable and DataIterator

Add possibility to customize 'item' slot in DataTable and DataIterator in mobile view by introducing
isMobile property to be available in the scope.

* test(vdatatable): fix snapshots

Fix test snapshots

* refactor(vdatatable): refactor DataTable and DataIterator isMobile property

Code refactor connected to code multiplication & fix tests

* refactor(vdatatable): space fix

Space fix

* refactor(vdatatable): typo fix

Typo fix

* style(vdatatable): typo fix

Typo fix

* refactor(vdataiterator): code refactor (small review changes)

* style(vdataiterator): typo fix

Typo fix
whoistobias pushed a commit to whoistobias/vuetify that referenced this issue Feb 26, 2020
… scope (vuetifyjs#10345)

fixes vuetifyjs#8394
fixes vuetifyjs#9436

* fix(vdatatable): add isMobile property to custom item slot scop in DataTable and DataIterator

Add possibility to customize 'item' slot in DataTable and DataIterator in mobile view by introducing
isMobile property to be available in the scope.

* test(vdatatable): fix snapshots

Fix test snapshots

* refactor(vdatatable): refactor DataTable and DataIterator isMobile property

Code refactor connected to code multiplication & fix tests

* refactor(vdatatable): space fix

Space fix

* refactor(vdatatable): typo fix

Typo fix

* style(vdatatable): typo fix

Typo fix

* refactor(vdataiterator): code refactor (small review changes)

* style(vdataiterator): typo fix

Typo fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment