1. 01 Nov, 2017 11 commits
  2. 31 Oct, 2017 7 commits
  3. 30 Oct, 2017 4 commits
  4. 28 Oct, 2017 1 commit
  5. 26 Oct, 2017 6 commits
  6. 25 Oct, 2017 10 commits
  7. 24 Oct, 2017 1 commit
    • Greg Spencer's avatar
      Add Material character counter to TextField. (#12648) · ea679171
      Greg Spencer authored
      This adds an optional character counter and maxLength parameter to the TextField, as described in the Material Design Spec.
      
      The counter text and style in the input decorator may be specified, but will default to the "right thing" if not specified, where the "right thing" is a counter that looks like "3 / 10" (if there are three characters entered into a field where maxLength is set to 10).
      
      To limit the number of characters entered, I created a LengthLimitingTextFormatter that will limit the number of characters (Unicode runes) in the input, which can be used independently. The formatter is applied after the other formatters supplied (if any). Even if there is no decorator, the text field will limit the number of characters input if maxLength is set.
      
      If maxLengthEnforced is set to false (it defaults to true), then the max length will not be enforced. In that case, if the text exceeds the length, then the counter will turn red, and it will make the divider turn red.
      ea679171