Commit 38ebf49
committed
fix(material/autocomplete): requireSelection incorrectly resetting value when there are no options (#27781)
The autocomplete has a check not to reset the value if the user didn't interact with the input. The problem was that we only accounted for it when there are options, because while technically an autocomplete is _attached_ when the user focuses, we don't consider it _open_ until it shows some options.
Fixes #27767.
(cherry picked from commit db06fa8)1 parent 0fe05b3 commit 38ebf49
File tree
2 files changed
+44
-5
lines changed- src/material/autocomplete
2 files changed
+44
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| 577 | + | |
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
| |||
596 | 597 | | |
597 | 598 | | |
598 | 599 | | |
599 | | - | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
603 | 608 | | |
604 | 609 | | |
605 | 610 | | |
| |||
650 | 655 | | |
651 | 656 | | |
652 | 657 | | |
653 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
654 | 662 | | |
655 | 663 | | |
656 | 664 | | |
| |||
712 | 720 | | |
713 | 721 | | |
714 | 722 | | |
715 | | - | |
716 | 723 | | |
| 724 | + | |
717 | 725 | | |
718 | 726 | | |
719 | 727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2663 | 2663 | | |
2664 | 2664 | | |
2665 | 2665 | | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
2666 | 2697 | | |
2667 | 2698 | | |
2668 | 2699 | | |
| |||
0 commit comments