Giter VIP home page Giter VIP logo

nova-row's Issues

[Feature Request] Callback save/update handling

Ability to pass a callback to Row that receives the resource, a collection of rows and allows freedom to process via eloquent in scenarios where json is not the desired outcome.

public function fields() 
{
    return [

        Row::make('Items', $this->itemFields())

            ->saving(function($order, $items) {

                $items->each(function($item) use($order) {
                    $order->items()->save($item);
                });

            });
    ];
}

public function itemFields()
{
    return [
        Text::make('Product'),
        Number::make('Quantity'),
        Number::make('Price')
    ];
}

Regarding validation

is it possible to have validation like at least one row is require or maximum 10 rows.

Setting default classes on form elements

This package is great, and works really well with Nova Fields.

When you implement another package say FilemanagerField it would be nice if you could set a default width / toggle off labels so that the fields that you can't call methods on can still be aligned nicely.

To prevent something like the below:

screen shot 2018-09-12 at 16 21 18

Something like:

->defaultFieldClasses('w-full px-8 py-6')->defaultHideLabelInForms()

[Feature Request] Row ordering

Ability to change the order of the resulting json by dragging and dropping the rows or with up/down arrows on each row, Im including some UI inspiration

interactions

[Feature Request] Remove nova-fields dependency

Would absolutely love this package if it didn't require the overriding of Nova's fields with 3rd party implementation. I really feel the style choices you made should just be baked in, there isn't much need for using the class methods then.

How to save data on table?

it always show [object Object],[object Object] so how should I persist the data in database. I have made price column with json field type.

Here is field detail.


            Row::make('Price', [
                Text::make('Currency')
                  ->fieldClasses('w-full px-8 py-6')
                  ->hideLabelInForms(),

                Number::make('Amount')
                  ->fieldClasses('w-full px-8 py-6')
                  ->hideLabelInForms(),

              ])->fieldClasses('w-full px-8 py-6')
                ->labelClasses('w-1/2 px-8 py-6'),

Now when i submit post in database it is stored as [object Object] etc..

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.