GithubHelp home page GithubHelp logo

Comments (3)

Madobyte avatar Madobyte commented on June 1, 2024

Hello @mmatuk,

We refactored our code to follow our documentation. The sortingEnabled property should always be specified and should not be null or undefined according to the following help topic: SortingState.ColumnExtension. Could you clarify if it's critical for your project to use the old logic?

from devextreme-reactive.

mmatuk avatar mmatuk commented on June 1, 2024

@Madobyte

Thank you getting back to me. We have a wrapper component around the SortingState that always injects a sortingEnabled value that matches the default sortingEnabled flag into the passed columnExtenstions array. This fixes the issue for us. In my opinion, though, it makes more sense to not require sortingEnabled flag for every column if you only want it enabled for one or two columns. The individual column config should allow overriding the default sortingEnabled flag and if not defined then it should fallback to the default. The current behavior does not do this. If you forget to add a sortingEnabled flag, even if it matches the default, you get some unexpected behavior as seen in the example above.

Your current documentation also does not indicate that if you add the sortingEnabled flag for even one column, then you must add it for every column even if it matches the columnSortingEnabled flag.

from devextreme-reactive.

Madobyte avatar Madobyte commented on June 1, 2024

Hello @mmatuk,

In our documentation, we add ? after property names that can be null/undefined. You can see examples here: https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/sorting-state/#properties. The sortingEnabled property in SortingState.ColumnExtension does not have ?, which means that it should be explicitly defined.

In any case, we appreciate your feedback and we'll consider adding a default value to the sortingEnabled property.

from devextreme-reactive.

Related Issues (20)

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.