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

[TextField] added left/right icon #2932 #4027

Closed
wants to merge 2 commits into from
Closed

Conversation

skarnecki
Copy link

@skarnecki skarnecki commented Apr 18, 2016

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Fix #2932.

@nathanmarks
Copy link
Member

@oliviertassinari

This component already has enough performance issues re-rendering because of the sheer amount of stuff going on -- do you think this is a good idea to add at this time?

@oliviertassinari oliviertassinari added out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI and removed out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) labels Apr 18, 2016
@oliviertassinari
Copy link
Member

oliviertassinari commented Apr 18, 2016

@skarnecki Thanks for this PR but I agree with @nathanmarks I don't think that we should add a leftIcon and rightIcon to the TextField component.

I guess you try to achieve something like that:
capture d ecran 2016-04-18 a 19 54 09

That could but also useful for a SelectField, a DatePicker or a TimePicker #2930.
I think that we should provide a container component for this use case.
@skarnecki Do you want to work on this instead?

@nathanmarks
Copy link
Member

@oliviertassinari I think that's a great idea for the multiple use cases 👍

@skarnecki
Copy link
Author

@oliviertassinari
I need this for Auto-complete component. Suggested container component is not a solution to my problem. I wanted auto-suggest box to be full width of input, including icon.
screenshot 2016-04-19 14 55 28

If there is a way to achive similar look without modifying textfield I'm please tell me.

@nathanmarks
Copy link
Member

@skarnecki You could add padding and use a pseudo element to render a material icon.

I'm closing this for now as we won't be adding more features to the current TextField due to the aforementioned reasons.

@binarykitchen
Copy link

@nathanmarks I tried with a pseudo element like that (Reagent)

(defn search []
  [:div
   [icons/action-search]
   [rui/text-field {:hint-text  "Enter search text" :full-width true}]])

But the problem then is that both aren't on the same line and even with inline styles, I can't change that. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants