Giter Site home page Giter Site logo

Comments (4)

smnandre avatar smnandre commented on August 20, 2024

You must use writable to define what is writable in your LiveProp... or i suppose it won't be updated.

Maybe then try with

#[LiveProp(writable: ['title', 'content'], onUpdated: ['title' => 'onTitleUpdated'])]

https://symfony.com/bundles/ux-live-component/current/index.html#writable-object-properties-or-array-keys

from ux.

GonZOO82 avatar GonZOO82 commented on August 20, 2024

onUpdated don't working on object :/

from ux.

smnandre avatar smnandre commented on August 20, 2024

The example in the documentation does not work for you ?

https://symfony.com/bundles/ux-live-component/current/index.html#add-a-hook-on-liveprop-update

from ux.

GonZOO82 avatar GonZOO82 commented on August 20, 2024

If I use the writable: true, does not work onUpdated on the property.

#[LiveProp(writable: true, onUpdated: ['title' => 'onTitleUpdated'])]
public Post $post;

I just read this

By default, the user can't change the properties of an entity LiveProp You can allow this by setting writable to property names that should be writable. This also works as a way to make only some keys of an array writable:

Question:
How can i catch the value of property when the form changes?

from ux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.