Giter VIP home page Giter VIP logo

sproutcore-table's People

Contributors

mauritslamers avatar nicolasbadia avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

sproutcore-table's Issues

Inconsistent reloading of visible rows on column width change or reorder

After fixing the column header width issue I found that changing the column width or changing it's position does not always reload the visible rows (using Sproutcore 1.11). The visible rows retain the original width and position. Scrolling the view or clicking on the visible rows does cause them to reload but looks odd.

Clicking on a row and scrolling up and down prior to attempting the width or order change causes it to work properly. Resort a column so the data reloads and it to goes back to the original behavior where the rows do not reload properly.

The reload() function in SC.TableView is not causing the rows to be rendered via the SC.TableRowView render() or update() functions. This seems to be an issue down in the SC.CollectionView where if the exampleView is pooled and the content doesn't change the rows are not reloaded.

Setting isReusable to false stops the row views from being pooled and fixes the problem for me. I am using the default cell content via the renderTableCellContent(). My cells are simple divs around simple text so redrawing the visible cells every time is not expensive. This might be a problem for more elaborate cell layouts.

I looked into turning off isReusable temporarily during a column resize or reorder but this appeared complicated. I was wondering if you have any suggestions.

By the way the jslewis SCTable (https://github.com/jslewis/sctable) has this same problem with Sproutcore 1.11.

Changing column width does not work with Sproutcore 1.11

When attempting to change the width of a column the header view grows and shrinks erratically. After investigating it appears the event.pageX value used the first time SC.TableHeaderView:mouseDragged() is called is undefined causing the newWidth calculation to generate erratic values.

This can be solved by saving the X position in the mouseDown() function then checking the event.pageX for undefined in mouseDragged(). If so use the saved X position.

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.