Skip to content

feat: Binding expression parser additions and improvements - #9791

Merged
NathanWalker merged 16 commits into
NativeScript:release/8.2.0from
CatchABus:xml-expression-fixes-8.2
Feb 21, 2022
Merged

NathanWalker merged 16 commits into
NativeScript:release/8.2.0from
CatchABus:xml-expression-fixes-8.2

Conversation

@CatchABus

@CatchABus CatchABus commented Feb 20, 2022 •

Copy link
Copy Markdown
Contributor

PR Checklist

What is the new behavior?

The follow additions are included in this patch:

  • Better error reporting for binding expression parsing failure
  • Added missing optional chaining support for callbacks
  • Using a safer approach to recognize converters
  • Fixed an issue that caused a circular reference for $value key in certain cases of two-way binding
  • Re-added lost converters feature according to docs: Since the usual operation is converting data from model to view, if a function is provided as converter, it acts as a toView function.
  • If a property caller is undefined (e.g. caller.property1.property2), parser will return undefined instead of throwing error. This is similar to old behaviour and is an attempt to fix issues similar to core 8.2.0-alpha.1+ : Binding: Run-time error occured in file: undefined at line: undefined and column: undefined #9785

@felixkrautschuk This patch includes changes that should help with your issues. Once this is merged in an alpha version, I would like you to give me some feedback regarding its functionality.

Fixes #9785 .

@cla-bot cla-bot Bot added the cla: yes label Feb 20, 2022
@felixkrautschuk

Copy link
Copy Markdown
Contributor

Thank you for all your investigations and commits!
So I'm looking forward for your changes to be included in alpha release (just tested 8.2.0-alpha.10 but the changes seem to not to be included there yet)

@edusperoni edusperoni changed the title feat(8.2): Binding expression parser additions and improvements feat: Binding expression parser additions and improvements Feb 21, 2022
@NathanWalker
NathanWalker merged commit cdd5bf7 into NativeScript:release/8.2.0 Feb 21, 2022
@NathanWalker

Copy link
Copy Markdown
Contributor

@felixkrautschuk published with 8.2.0-alpha.11 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants