Results 1 to 3 of 3

Thread: Missing sort indicator for grid

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member feelinforyou's Avatar
    Join Date
    Dec 2012
    Posts
    100
    Vote Rating
    4
      0  

    Default Missing sort indicator for grid

    If i don't use a default ValueProvider the blue icon for the sort direction ist missing.
    For example:

    Code:
    public ValueProvider<IMatch, Date> matchDate();
    
        public ValueProvider<IMatch, String> groupDate();
    
        public ValueProvider<IMatch, MatchType> matchType();
    
        public ValueProvider<IMatch, String> team1 = new ValueProvider<IMatch, String>() {
            @Override
            public String getValue(IMatch object) {
                return getTeam(object, object.getTeam1());
            }
    
            private String getTeam(IMatch object, TeamDto teamDto) {
                final StringBuilder builder = new StringBuilder();
    
                final PlayerDto player1 = teamDto.getPlayer1();
                builder.append(player1.getLastName()).append(", ");
                builder.append(player1.getFirstName());
    
                if (object.getMatchType() == MatchType.Double) {
                    builder.append(" | ");
    
                    final PlayerDto player2 = teamDto.getPlayer2();
                    builder.append(player2.getLastName()).append(", ");
                    builder.append(player2.getFirstName());
                }
                return builder.toString();
            }
    
            @Override
            public void setValue(IMatch object, String value) {
            }
    
            @Override
            public String getPath() {
                return null;
            }
        };
    For the matchDate, groupDate and matchType everything looks fine. For team1 you won't get the indicator, but sorting still works.

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    If you don't return a string from ValueProvider.getPath(), the columns don't know how to highlight that row for this or other state changes. Try returning something unique for that ValueProvider like "team1", and see if that resolves this.

  3. #3
    Sencha Premium Member feelinforyou's Avatar
    Join Date
    Dec 2012
    Posts
    100
    Vote Rating
    4
      0  

    Default

    Problem fixed. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •