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

Initial sorting equals sortColumn #61

Merged
merged 1 commit into from
Oct 3, 2014

Conversation

ismooth
Copy link
Contributor

@ismooth ismooth commented Oct 3, 2014

After a user has changed sorting order of DataObjects in the list, and when drag&drop is disabled, sorting is made by $default_sort from that DataObjects property or default set by SS. This results in different sorting when checkbox is enabled or disabled what confuses users. This change always sorts the list by $sortColumn, so that user always sees same sorting.

After a user has changed sorting order of objects in the list, and when drag&drop is disabled, sorting is made by $default_sort from that DataObjects property or default set by SS. This results in different sorting when checkbox is enabled or disabled what confuses users. This change always sorts the list by $sortColumn, so that user always sees same sorting.
UndefinedOffset added a commit that referenced this pull request Oct 3, 2014
Initial sorting equals sortColumn
@UndefinedOffset UndefinedOffset merged commit 2e9b7be into UndefinedOffset:master Oct 3, 2014
@UndefinedOffset
Copy link
Owner

Thanks, I've never noticed this because I always set the default sort to be the sort column. Out of curiosity what was the use case for having the default_sort different from the sort column?

@ismooth
Copy link
Contributor Author

ismooth commented Oct 3, 2014

Hi,

I have Keyword (DataObject) which is many_many related to Articles. When I
create new Keyword I first check it's existence using
Keyword::get()->filter(...)->first(). If I set $default_sort of Keyword to
SortOrder (which actually only exists in the relation, but not on
DataObject itself) and try to do the lookup, I get SQL error cause SS tries
to do the sorting according to SortOrder column which doesn't exist in
Keyword table. Therefore I need different $default_sort from 'SortOrder'.

Cheers,
Igor

On Fri, Oct 3, 2014 at 4:23 PM, Ed Chipman [email protected] wrote:

Thanks, I've never noticed this because I always set the default sort to
be the sort column. Out of curiosity what was the use case for having the
default_sort different from the sort column?


Reply to this email directly or view it on GitHub
#61 (comment)
.

@UndefinedOffset
Copy link
Owner

Ah cool that makes allot of sense, I was just wondering :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants