Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change to value of property in an @observable object doesn't trigger @autorun #879

Open
ericvida opened this issue Nov 30, 2023 · 0 comments
Labels

Comments

@ericvida
Copy link
Member

ericvida commented Nov 30, 2023

Description

change to value of property in an @observable object doesn't trigger @autorun
and I expected it to. Is this a feature or a bug?

	@observable query = {word: "", definition: ""}
	@autorun def search
		unless query.word is ""
			APP.filtered_words = APP.words.filter(do $1.name.includes query.word )
		else
			APP.filtered_words = APP.words

This works

	@observable wordQuery = ""
	@observable definitionQuery = ""
	@autorun def search
		unless wordQuery is ""
			APP.filtered_words = APP.words.filter(do(word) word.name.includes wordQuery )
		else
			APP.filtered_words = APP.words

Reproduction

No response

System Environment

No response

@ericvida ericvida added the bug label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant