Skip to content

fix(readonly): allow readonly to be forced to false when plaintext is enabled #1841

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

Merged
merged 2 commits into from
May 21, 2018
Merged

fix(readonly): allow readonly to be forced to false when plaintext is enabled #1841

merged 2 commits into from
May 21, 2018

Conversation

syffs
Copy link
Contributor

@syffs syffs commented May 17, 2018

plaintext could be convenient to customize b-input styling (for example when you need to wrap it into a div), but readonly is currently forced to true, when plaintext is enabled.

this PR introduces an indeterminate state for readonly, and hence allows it to be forced to false even with plaintext enabled.

@codecov
Copy link

codecov bot commented May 17, 2018

Codecov Report

Merging #1841 into dev will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #1841   +/-   ##
=======================================
  Coverage   60.85%   60.85%           
=======================================
  Files         154      154           
  Lines        2879     2879           
  Branches      798      798           
=======================================
  Hits         1752     1752           
  Misses        808      808           
  Partials      319      319
Impacted Files Coverage Δ
src/components/form-input/form-input.js 46.15% <0%> (ø) ⬆️

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 7520554...2e519a4. Read the comment docs.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@pi0 pi0 merged commit b02a6ee into bootstrap-vue:dev May 21, 2018
@tmorehouse
Copy link
Member

Actually plaintext is supposed to be a readonly input per Bootstrap V4 docs (it is meant to display a form control that is read only, but without the grey background., making it looks more like text.

It would be better to define override styles to override form-control using an extra class on the input (as per Bootstrap V4 custom styles ability)

tmorehouse added a commit that referenced this pull request Nov 14, 2018
reverts changes from #1841, as it breaks the readonly plaintext requirements (plus documentatijn was not properly updated to reflect changes)
tmorehouse added a commit that referenced this pull request Nov 14, 2018
* fix(fom-input): revert changes from PR #1841

reverts changes from #1841, as it breaks the readonly plaintext requirements (plus documentatijn was not properly updated to reflect changes)

* Update form-input.spec.js

* lint
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.

3 participants