Comments (2)
Only "simple" sort orders are preserved -- i.e., when the table is sorted by one column only. But if you sort it based on two or more columns (protip: shift-click columns to do that), only the latest clicked column is saved and that's what is used when the page is restored.
It seems to me that the two ways out of this are:
- Be smarter about keeping track of which columns were clicked. ("Was the shift key down?")
This seems really painful. - Instead of keeping track of the sorting order for each column, always keep the list of rooms in the same order as they are in the table.
CONS: more computation (getting the order of the rooms); potentially, a lot more data to store client-side; not sure how it will interact with default ordering when rooms are loaded back into table
PROS: likely easier to implement; I was going to do something like this for the star tab anyway, so the framework can be shared
from cella.
It turns out that it's not as dire as I thought it would be. If you dig around inside the table, you can find the sortList
object, which stores exactly how the tables are sorted, multiple columns and everything. This even obviates the need for the extra click handler I wrote to get the clicked column.
from cella.
Related Issues (20)
- Broken back button behavior
- Clarify sharing option when there are no starred rooms
- Tone down "move" cursor over starred rooms
- Past result popovers sometimes don't open
- Placeholder when all items in list unavailable, hidden
- Availability not retrieved for rooms that only appear in star tab
- Availability preference doesn't fully reset
- Incorrect Room Information HOT 2
- Incorrect Room Information HOT 2
- More Incorrect Room Information HOT 1
- Room changes not propagated when results cached
- Floorplan label on rooms with no floorplans HOT 1
- Sort not updated after live update
- Pre-fill occupancy in new tabs
- Hide rooms that are taken with other unavailable rooms
- Broken on node 0.8.x HOT 1
- Add floorplan for 315 Thayer HOT 1
- Include 2012 data HOT 1
- Support 2013 housing changes HOT 1
- Add 2013 rooms
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cella.