webscopeio / react-textarea-autocomplete

📝 React component implements configurable GitHub's like textarea autocomplete.
MIT License
454 stars 80 forks source link

selected property for entire item #153

Closed Daniele122898 closed 5 years ago

Daniele122898 commented 5 years ago

So i saw that there is a selected style when you use the arrow keys so i can change the color. But as you can see it only works for the entity. There seems to be no such thing for the entire item like on the hover event as seen above.

image

Is there a way so that i can change the color of the entire item with the selected function or is that planned?

jukben commented 5 years ago

You should be able to style it with .rta__entity--selected and .rta__entity class selector for example.

Daniele122898 commented 5 years ago

it doesnt seem to work for some reason. when i hover over it, everything turns purple. But when i use the arrow keys only the inside changes color using the .rta__entity--selected class. I need the entire item to change color but there is no .rta__item--selected class

jukben commented 5 years ago

Ah, I follow now. You're correct. Let's add class also for item then, are you willing to sent PR for it?

PS: I hope there is way how to restyle your component to rely only on rta _entity classes, but on the other hand I think your use-case is correct as well, so let's extend the API.

Reference: https://github.com/webscopeio/react-textarea-autocomplete/blob/master/src/Item.jsx#L40

Daniele122898 commented 5 years ago

i can try sure :)

O4epegb commented 5 years ago

I think this could be closed now!)

jukben commented 5 years ago

Closed in 6b5296499d503f540b31089521134b80b610141a