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

Enable different item label for selected item #892

Closed
wants to merge 2 commits into from

Conversation

maximpetrov
Copy link
Contributor

This pull request adds ability to display selected result (in select field) in different way than in dropdown e.g. display detail item in dropdown but only name in field after selection.

@codecov-io
Copy link

codecov-io commented Jul 22, 2017

Codecov Report

Merging #892 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #892      +/-   ##
==========================================
+ Coverage   95.02%   95.03%   +<.01%     
==========================================
  Files         124      124              
  Lines        2172     2174       +2     
==========================================
+ Hits         2064     2066       +2     
  Misses        108      108
Impacted Files Coverage Δ
src/dal_select2/views.py 100% <ø> (ø) ⬆️
src/dal/views.py 92.72% <100%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8561171...59a7149. Read the comment docs.

@gagarski
Copy link
Member

Should fix #845

@jpic
Copy link
Member

jpic commented Jul 25, 2017

Looks good for me !

We just need some tests in this PR.

@@ -21,6 +21,7 @@ def get_results(self, context):
{
'id': self.get_result_value(result),
'text': self.get_result_label(result),
'selected_text': self.get_selected_result_label(result),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is worth adding this field only if it is different from text. Now one text is sent in two fields even when it is identical.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true but we're going to merge this as is so if you got hard feelings about this then perhaps make another pr or open a ticket 😂

@jpic
Copy link
Member

jpic commented Dec 29, 2017

Will be in next release.

@jpic jpic closed this Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants