okfn-brasil / mosaico

Visualization on the brazilian budget for FGV
GNU Affero General Public License v3.0
5 stars 0 forks source link

Filter and sorting on the data grid table #22

Closed ltartari closed 10 years ago

vitorbaptista commented 10 years ago

Do we want filtering, or just sorting? Maybe it would be good to add a line number as well, so it's easy to see the ranking whenever we sort...

ltartari commented 10 years ago

I believe both filtering and sorting. Line numbers are definitely a plus ;-)

vitorbaptista commented 10 years ago

I enabled the filtering and sorting, and added the line numbers.

@ltartari I added some basic styles, just changing the cursor when a column is sortable and removed that outline on https://github.com/okfn/fgv/commit/3d065882b5df390ae92e83beb62518efbdd0b255. At first I thought about styling th with everything that I wanted for the sortable columns and then simply remove from .sorting_disable stuff like the cursor, but then I prefered to use the classes .sorting, .sorting_asc, .sorting_desc to be more specific.

I don't know if there's any performance penalty, as we're looking for 3 classes instead of simply 1 element. It's probably negligible given the clarity gains, but I got curious. Do you know how bad is it?

P.S.: AFAIK, it's dev complete as well.

vitorbaptista commented 10 years ago

Ah, I didn't enable sorting by the "entity" name, as we don't have a general name for it yet. If we can't find one and we want to enable sorting on that column, it's dependent on #42