Coder Social home page Coder Social logo

v2-table scroll issue about v2-table HOT 7 CLOSED

dwqs avatar dwqs commented on June 16, 2024
v2-table scroll issue

from v2-table.

Comments (7)

dwqs avatar dwqs commented on June 16, 2024 3
<v2-table v-if="cursos.length>0" height=132 :data="cursos" ref="table">
    <v2-table-column width=20 label="#" prop="sequence"></v2-table-column>
    <v2-table-column label="Curso" prop="nome"></v2-table-column>
    <v2-table-column label="Data de matrícula" prop="datamatricula"></v2-table-column> 
    <v2-table-column label="Data de conclusão" prop="dataconclusao"></v2-table-column>  
    <v2-table-column label="Nota" prop="nota"></v2-table-column>  
</v2-table>

When cursos is updated, you can reset the scrollbar via calling updateScrollbar method of table:

this.cursos = new-cursos-data
this.$refs.table.updateScrollbar(true);

@marcelobcortes You need to upgrade v2-table to v3.0.1. Hope it helps you.

from v2-table.

dwqs avatar dwqs commented on June 16, 2024 1

@marcelobcortes I have reproduced it. And I will fix it as soon as possible. Thanks for your feedback.

from v2-table.

dwqs avatar dwqs commented on June 16, 2024

Which version do you use? And can show me a case or more code? @marcelobcortes

from v2-table.

marcelobcortes avatar marcelobcortes commented on June 16, 2024

Hello!
https://github.com/marcelobcortes/teste-fullstack

teste-fullstack/resources/assets/js/components/alunos.vue

(if you can I would love to receive feedback about the whole project code)

from v2-table.

dwqs avatar dwqs commented on June 16, 2024

@marcelobcortes I have seen your code and I want to know how to switch to other modal ?

from v2-table.

marcelobcortes avatar marcelobcortes commented on June 16, 2024

click in a entry in "alunos" sections.
shows up "aluno" data and a v2-table.
v2-table was configured to show 3 entries... so find a "aluno" with more than 3 entries (if you find easier, change alunocertificadofactory to create more entries) and scroll all it down and close
after that, click in another entry and you will see that v2-table scroll's position did not get reseted despite of the data got refreshed

let me know if I still wasnt clear enough

from v2-table.

sknightq avatar sknightq commented on June 16, 2024

@dwqs I think put the update scroll function in v2-table component rather than exposed outside because sometimes the table DOM's render doesn't finish, but I have invoked the update scroll function.
like following snippets:

watch: {
  rows(newRows, oldRows) {
     this.$refs.table.updateScrollbar(true);
    // At this moment, my table is still old
  }
}

from v2-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.