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

Material Design - floatLabel option does not work #109

Closed
1 of 5 tasks
Jascen opened this issue Apr 17, 2019 · 3 comments
Closed
1 of 5 tasks

Material Design - floatLabel option does not work #109

Jascen opened this issue Apr 17, 2019 · 3 comments

Comments

@Jascen
Copy link

Jascen commented Apr 17, 2019

Describe the bug
which template:

  • MaterialDesignFrameworkModule — Material Design
  • Bootstrap3FrameworkModule — Bootstrap 3
  • Bootstrap4FrameworkModule — Bootstrap 4
  • NoFrameworkModule — plain HTML
  • Other (please specify below)

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Visit the demo page: https://hamidihamza.com/Angular6-json-schema-form/?set=asf&example=asf-simple&framework=material-design&language=en
  2. Select the Material Design framework.
  3. Use the following schema:
{
  "schema": {
    "type": "object",
    "properties": {
      "first_name": {
          "type": "string",
          "floatLabel": "always"
      }
    }
  }
}

Expected behavior
The 'First Name' label is floated.

Desktop (please complete the following information):

  • OS: Win 10
  • Browser: Chrome
  • Version: 73.0.3683.86

Context
This feature is documented as supported, however, I am unable to get it to work.

@Jascen
Copy link
Author

Jascen commented Apr 17, 2019

It may be worth noting that the following schema shows that the 'textarea' type properly respects the 'floatLabel' property.

{
  "schema": {
      "first_name": {
          "type": "string"
      }
  },
  "form": [
    {
      "key": "first_name",
      "type": "textarea",
      "placeholder": "Make a comment",
      "floatLabel": "auto"
    }
  ]
}

@Jascen
Copy link
Author

Jascen commented Apr 17, 2019

Specifying an appearance of 'legacy' will allow floatLabel to work again.

{
  "schema": {
    "type": "object",
    "properties": {
      "first_name": {
          "type": "string",
          "appearance": "legacy",
          "floatLabel": "auto"
      }
    }
  }
}

This commit is what caused it to stop working.

However, it is worth noting that this Stackblitz shows that floatLabel should work with the appearance 'standard', so this is still a valid issue.

@github-actions
Copy link

github-actions bot commented Apr 2, 2020

Stale issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant