Skip to content

b-form-input is broken with changes to hasFormatter computed property #6124

@dreysolano

Description

@dreysolano

Describe the bug

@jackmu95

On input of a b-form-input, the computed property hasFormatter throws a "Cannot read property 'name' of null" error when no formatter prop is provided, which results in this.formatter being null.
hasFormatter() { return this.formatter.name !== props.formatter.default.name }

EDIT: above code is in src/mixins/form-text.js

Steps to reproduce the bug

  1. Go to a form that uses b-form-input
  2. Open debugger
  3. Type characters into the form field
  4. See error in console
  5. This appears to prevent a value from actually being set for the input

Expected behavior

User is able to enter a value and have the value persist on form submit

Versions

Libraries:

  • BootstrapVue: 2.20.1
  • Bootstrap: 4.5.3
  • Vue: 2.6.12

Environment:

  • Device: Mac
  • OS: macOS Catalina
  • Browser: Chrome
  • Version: 87

Demo link

N/A as this is an internal application

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions