Commit 901ad06
authored
feat(SUrlTextField): improve URL handling in Value property (#768)
Updated the setter of the `Value` property to better handle input URLs.
Now, if the input is null or empty, it sets `_protocol` to "https" and clears `TextValue`.
If the input starts with "https://" or "http://", it updates `_protocol` and `TextValue` accordingly;
otherwise, it retains the original protocol and only updates `TextValue`.
Simplified the `ValueTextUpdateAsync` method to return an empty string for null or whitespace input,
and constructs the full URL for valid input, invoking `ValueChanged` with the complete URL.1 parent 164524e commit 901ad06
File tree
1 file changed
+21
-24
lines changed1 file changed
+21
-24
lines changedLines changed: 21 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
42 | 30 | | |
43 | | - | |
| 31 | + | |
| 32 | + | |
44 | 33 | | |
45 | 34 | | |
46 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 68 | + | |
| 69 | + | |
73 | 70 | | |
74 | 71 | | |
75 | | - | |
| 72 | + | |
76 | 73 | | |
77 | 74 | | |
78 | 75 | | |
79 | | - | |
| 76 | + | |
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
| |||
0 commit comments