Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant