Comments (6)
Thanks for the report. I'm going to merge this with #28876. The underlying issue is the same, but it looks like my setInput
fix in the linked PR isn't enough to resolve the issue. I'll see if there's a better way to resolve this and post updates in the linked thread.
from ionic-framework.
Hey there! I spoke with the team, and the usage in your demo is incorrect which results in the error. Since myModelInput
is already a writeable signal, you don't need to pass another signal when setting componentProps
, just the value of the signal is sufficient.
For example, your application passes signal(['one', 'two', 'three'])
, but you only need to pass ['one', 'two', 'three']
. Under the hood we use Angular's setInput
API which will take care of correctly updating the signal value while still keeping the data reactive.
from ionic-framework.
@liamdebeasi
Interesting! It works, but only partially.
First of all, that's counter-intuitive to what I originally thought since in an angular component, if you want bi-directional reactivity with a model input you have to pass the signal itself and not just the 'unwrapped' value (by calling it with a ()
at the end.)
Secondly, after testing I noticed that only the first value is pushed back to the original signal in the app.component.
I updated the reproduction which hopefully gets the point across.
from ionic-framework.
@liamdebeasi
Sorry for the ping! Just wanted to make sure my comment above doesn't get lost in the shuffle since this issue is marked as closed. Should it be reopened?
from ionic-framework.
It's possible that we need more clarification from the Angular team, but according to the existing documentation the usage noted in #29013 (comment) is correct.
It does not seem that the controllers have ever supported two way bindings via a single property, so that could be part of the issue here. The controller approach isn't ideal for reactive properties which is why we introduced the inline overlay syntax. You might want to try using an inline modal here instead.
from ionic-framework.
Being able to use two-way binding via a controller would be great DX for me, but I get how it is complicated. The inline overlay syntax isn't as handy for modal components that I want to reuse in many different places.
from ionic-framework.
Related Issues (20)
- bug: iOS "Go" Button Does Not Trigger `search` Event in `ion-searchbar` HOT 3
- bug: Properties ionNavWillChange and ionNavDidChange do not exist on IonNav HOT 5
- feat: improved `aria-label` for the searchbar's clear button, or a way for consuming apps to customize this value
- bug: max value changes when selecting the 31st and changing the month through the wheel HOT 1
- bug: Ion datetime constantly loops between two months when min date is set on iOS HOT 2
- bug: card modal doesn't add border radius until the modal is fully opened on iOS HOT 2
- bug: React navigation back and history.goBack() HOT 5
- ion-radio no longer selectable from clicking anywhere inside an ion-item HOT 3
- feat: Lifecycle events not working on IonNav components HOT 10
- bug(refresher): mode does not account for child pages with global mode set HOT 4
- bug: Custom CSS Properties Not Applying to ion-input with "fill" Attribute HOT 7
- bug: Overlays now have aria-hidden=true when displaying a Toast HOT 4
- bug: Capacitor compose 1.5 to 1.6 HOT 4
- bug: ion-button inherits styles from ancestor elements when in a keep-contents-mounted ion-modal HOT 4
- bug: modal is not consistently shifted upwards when keyboard is shown on ipad HOT 2
- bug: ion select shadow dom lable can not be used in angular HOT 2
- bug: ion-modal .modal-shadow z-index override not applying HOT 2
- bug: Click event on ion-item fires twice when ion-input is inside HOT 2
- bug: virtual prop mode does not account if assigned dynamically for all components HOT 1
- bug: in IonRouterOutlet types does not follow the proper type documentation HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-framework.