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

TagInput | add prop allowing to remove last tag when pressing backspace #604

Merged
merged 3 commits into from Feb 27, 2018

Conversation

adrlen
Copy link
Contributor

@adrlen adrlen commented Feb 14, 2018

No description provided.

@gkinsman
Copy link
Contributor

I wonder whether this should be a toggleable behaviour or whether it should just be the way the thing works. When would you ever not want to be able to remove a tag on backspace?

@adrlen
Copy link
Contributor Author

adrlen commented Feb 15, 2018

At first, I set the default value to true but then went back to false. I don't recall why actually, maybe not to broke the current behaviour.

As to if we should make it configurable or not, I think it's interesting to have both options.

@jtommy
Copy link
Member

jtommy commented Feb 22, 2018

@adrlen Ok, no breaking change. I'm thinking about prop name and if correct have a fixed char code.

@jtommy
Copy link
Member

jtommy commented Feb 26, 2018

@adrlen It's only a my personal idea but what do you think about a removable prop that enable removing by backspace and close tag icon ?

@adrlen
Copy link
Contributor Author

adrlen commented Feb 27, 2018

Then removing by backspace would be a default behavior since removable should be true by default I guess ?

I'm not sure I cant think of a case where you wouldn't want to be able to remove tag in an input. Since you already cant remove them with state disabled.

Maybe we could have prop remove-on-keys with backspace key by default ?

@jtommy
Copy link
Member

jtommy commented Feb 27, 2018

@adrlen Ok for remove-on-keys.
With removable (default true) i mean a tag list without close icon and with these two props we can combine these, for example removable prop equals to true and remove-on-keys equals to empty array, in a way to have the current behaviour.
Anyway we might discuss about removable later, remove-on-keys is enough at the moment, thanks!

@adrlen
Copy link
Contributor Author

adrlen commented Feb 27, 2018

I hardly see a case where someone would override this prop actually but I made the changes 🙂

@jtommy jtommy merged commit f66022d into buefy:dev Feb 27, 2018
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.

None yet

3 participants