Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store sorters' direction is emmitted as lowercase #1865

Open
fabriciomurta opened this issue Nov 8, 2021 · 0 comments
Open

Store sorters' direction is emmitted as lowercase #1865

fabriciomurta opened this issue Nov 8, 2021 · 0 comments
Milestone

Comments

@fabriciomurta
Copy link
Contributor

When specifying a store sorter, its direction value is all caps in Razor markup, but is emitted lowercase. This causes Ext JS to obey the direction BUT does not show the sort arrow at all.

According to Sencha documentation, the valid input to direction is either the ASC or DESC strings.

So this:

<ext-sorter property="company" x-direction="DESC" />

gets output as this:

sorters: [{
    direction: "desc",
    property: "company"
}],

Which results in the above error.

When sorting in ascending order, another bug with Ext.NET 7 makes it work, because when a value is specified -and- it matches whatever default Ext.NET thinks Ext JS has, Ext.NET does not emit the value at all. It means the direction: "asc" line is not output at all, and Ext JS uses default sorter direction.

In order to circumvent the issue, just define direction as a custom config:

<ext-sorter property="company" x-direction="DESC" />
@fabriciomurta fabriciomurta added this to the 7.x milestone Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant