question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Propsal: further refactoring on DataTable/TreeTable column related state

See original GitHub issue

Currently we have the following state, which is also stored in the MVS:

    private Map<String, SortMeta> sortBy;
    private Map<String, FilterMeta> filterBy;
    private String orderedColumnsAsString;
    private Map<String, Boolean> visibleColumns;
    private Map<String, String> resizableColumns;

and orderedColumns is still not refactored.

TBH i dont like further refactorings for 100% as our current code is quite nice and stable compared to 8.0 BUT the next version will be 10.0 and i dont like to refactor everything again. And we have at least 3-4 weeks before a RC1.

we could merge and unify many many code if we would create a

private Map<String, ColumnState> columnState;

which would contain all those info on sorting and filtering, width, ordering, resize etc. etc. we could also unify the SortBuilder and FilterBuidler and attributes, we would only have something like:

<p:dataTable columnsConfigs="..." />

with

ColumnStateBuilder......sortOrder(...).filterValue(....).width(200).visible(false).build();

maybe the same on p:column for a single entry.

@Rapster @christophs78 @melloware WDYT?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
tandraschkocommented, Dec 17, 2020

Lets wait, primetek will do it when releasing RC1

1reaction
tandraschkocommented, Dec 14, 2020

more managable and more unified columnSettings instead of X builder, just 1 for all

Read more comments on GitHub >

github_iconTop Results From Across the Web

Specify table to reload state only when column visibility is ...
Hi, Is there a way to set the stateLoadCallback to only reload the state when the column visibility is updated?
Read more >
state() - DataTables
When state saving is enabled ( stateSave ) it can be useful to know what state has been saved for a table an...
Read more >
State saving - DataTables example
DataTables saves the state of a table (its paging position, ordering state etc). When the stateSave option is enabled, it can be restored...
Read more >
Creation Modal with Toggle for Columns - DataTables example
toggle option can be used to decide what elements of datatables should save their state when creating a new state. This example shows...
Read more >
Unable to render data to Datatable when its more than 8 ...
I have a Datatable that when I add more than eight columns it won't render. I am using GET on an ajax request...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found