Skip to content

Replace Suspense with CSS skeleton loader and simplify loading behavior#33

Merged
NicolasDevil merged 1 commit intowxsub:mainfrom
CsJustinPowell:main
Mar 17, 2026
Merged

Replace Suspense with CSS skeleton loader and simplify loading behavior#33
NicolasDevil merged 1 commit intowxsub:mainfrom
CsJustinPowell:main

Conversation

@CsJustinPowell
Copy link
Copy Markdown
Contributor

Replace the hasOwnProperty check in the watcher with a simple truthy check on the incoming value. Previously the watcher invoked searchRemoteMethod whenever the prop existed (even if undefined), which could trigger unnecessary calls; now the remote search is only called when initialValue is truthy (non-null/undefined/non-empty). Note: this changes behavior for falsy values like 0 or empty string, which will no longer trigger the search.

Replace the hasOwnProperty check in the watcher with a simple truthy check on the incoming value. Previously the watcher invoked searchRemoteMethod whenever the prop existed (even if undefined), which could trigger unnecessary calls; now the remote search is only called when initialValue is truthy (non-null/undefined/non-empty). Note: this changes behavior for falsy values like 0 or empty string, which will no longer trigger the search.
@CsJustinPowell
Copy link
Copy Markdown
Contributor Author

if (Object.prototype.hasOwnProperty.call(props, 'initialValue')) {
searchRemoteMethod(value)
}

This if condition will always be true.

@NicolasDevil
Copy link
Copy Markdown
Contributor

if (Object.prototype.hasOwnProperty.call(props, 'initialValue')) { searchRemoteMethod(value) }

This if condition will always be true.

you are right

@NicolasDevil NicolasDevil added the bug Something isn't working label Mar 17, 2026
@NicolasDevil NicolasDevil merged commit e505fbd into wxsub:main Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants