Git Product home page Git Product logo

webbuilders-group-silverstripe-statefulunsavedlist's Introduction

GridField Stateful Unsaved List

GridField component that allows unsaved relation lists for many_many relationships when managing existing objects on the right side of the relationship to be stored in the GridField's state and session.

Maintainer Contact

Requirements

  • SilverStripe Framework 3.1.x

Installation

composer require webbuilders-group/silverstripe-statefulunsavedlist

If you prefer you may also manually install:

Usage

To use this module you need to use StatefulGridField instead of GridField when initializing your GridField. Note that at this time this module does not support has_many relationships it only supports many_many relationships. You may get undesired effects with a has_many relationship.

#####Before:

$fields->push(new GridField('ExampleRelation', 'Example Relation', $this->ExampleRelation(), GridFieldConfig_RelationEditor::create(10)));

#####After:

$fields->push(new StatefulGridField('ExampleRelation', 'Example Relation', $this->ExampleRelation(), GridFieldConfig_RelationEditor::create(10)));

##Note about 3rd party components Some 3rd party components may run into issues with this module since it modifies the address of the field to include a hash in the url. This has is used to remover the GridState from the session should it not be passed as part of the request. 3rd party components that utilize the link of the GridField may not be accounting for the case where the url has parameters already appended to the url. It's recommended that you file an issue on that components module, however you may also want to raise one here first for investigation.

webbuilders-group-silverstripe-statefulunsavedlist's People

Contributors

undefinedoffset avatar

Watchers

James Cloos avatar helpfulrobot avatar

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.