We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ae1d37 commit f5fedddCopy full SHA for f5feddd
2 files changed
resources/scss/src/component/CountryFlag.scss
@@ -5,7 +5,7 @@
5
overflow : hidden;
6
width : 100%;
7
8
- .neo-country-flag, .neo-country-placeholder {
+ .neo-country-flag {
9
flex : none;
10
height : 20px;
11
margin-right: 8px;
src/component/CountryFlag.mjs
@@ -42,6 +42,11 @@ class CountryFlag extends Component {
42
vdom = me.vdom,
43
[flag, text] = vdom.cn;
44
45
+ // Performance Optimization:
46
+ // We maintain a persistent <img> tag in the VDOM structure to ensure a stable DOM.
47
+ // Swapping tags (e.g. img <-> span) or removing nodes triggers layout thrashing
48
+ // during rapid recycling (e.g. Grid scrolling).
49
+ // We toggle visibility instead of structural changes.
50
if (url) {
51
flag.src = url;
52
flag.style = null; // Remove visibility: hidden
0 commit comments