PHPackages                             sandstorm/lazydatasource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sandstorm/lazydatasource

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

sandstorm/lazydatasource
========================

Neos package implementing a lazy data source for the UI; so that the elements are loaded lazily on demand.

3.0(1y ago)1044.5k—1.6%3[2 issues](https://github.com/sandstorm/LazyDataSource/issues)3MITJavaScript

Since Nov 12Pushed 1y ago7 watchersCompare

[ Source](https://github.com/sandstorm/LazyDataSource)[ Packagist](https://packagist.org/packages/sandstorm/lazydatasource)[ Docs](https://github.com/sandstorm/LazyDataSource)[ RSS](/packages/sandstorm-lazydatasource/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (3)

Sandstorm.LazyDataSource
========================

[](#sandstormlazydatasource)

[Inspector Data Sources](https://docs.neos.io/cms/manual/extending-neos-with-php-flow/custom-data-sources)in Neos are usually *eager*, this means the UI sends a single request to the backend to load all options, and then doing the filtering client-side.

This package implements additional Inspector Editors, behaving like the standard SelectBoxEditor with data sources, but **delegates filtering and searching to the server-side**.

This greatly improves Neos UI performance for data sources with big collections (100s of elements).

Getting started
---------------

[](#getting-started)

1. Default composer installation via:

    ```
    composer require sandstorm/lazydatasource
    ```
2. **for a single select:**

    In your `NodeTypes.yaml`, activate the custom editor by using `Sandstorm.LazyDataSource/Inspector/Editors/DataSourceSelectEditor`instead of `Neos.Neos/Inspector/Editors/SelectBoxEditor`. \*\*All configuration options [of the data source-based select](https://neos.readthedocs.io/en/stable/References/PropertyEditorReference.html#property-type-string-array-string-selectboxeditor-dropdown-select-editor)apply as usual.

    Additionally, we support the following additional `editorOptions`:

    - `dataSourceMakeNodeIndependent`: if set to TRUE, the currently selected node is NOT sent to the data source on the backend, increasing the cache lifetime on the client (e.g. the system can re-use elements from other nodes)

    **Example:**

    ```
    'Neos.Demo:Document.Page':
      properties:
        test:
          ui:
            inspector:
              group: 'document'

              ##### THIS IS THE RELEVANT CONFIG:
              editor: 'Sandstorm.LazyDataSource/Inspector/Editors/DataSourceSelectEditor'

              ##### all Select options (e.g. dataSourceAdditionalData) work as usual.
              editorOptions:
                placeholder: Choose
                dataSourceIdentifier: lazy-editor-test
    ```
3. **for a multi select:**

    In your `NodeTypes.yaml`, activate the custom editor by using `Sandstorm.LazyDataSource/Inspector/Editors/DataSourceSelectEditor`instead of `Neos.Neos/Inspector/Editors/SelectBoxEditor`. \*\*All configuration options [of the data source-based select](https://neos.readthedocs.io/en/stable/References/PropertyEditorReference.html#property-type-string-array-string-selectboxeditor-dropdown-select-editor)apply as usual.

    Additionally, we support the following additional `editorOptions`:

    - `dataSourceMakeNodeIndependent`: if set to TRUE, the currently selected node is NOT sent to the data source on the backend, increasing the cache lifetime on the client (e.g. the system can re-use elements from other nodes)

    **Example:**

    ```
    'Neos.Demo:Document.Page':
      properties:
        test2:

          ##### Do not forget to set the property type to array
          type: array
          ui:
            inspector:
              group: 'document'

              ##### THIS IS THE RELEVANT CONFIG:
              editor: 'Sandstorm.LazyDataSource/Inspector/Editors/DataSourceSelectEditor'

              ##### all Select options (e.g. dataSourceAdditionalData) work as usual.
              editorOptions:
                allowEmpty: true
                multiple: true
                placeholder: Choose
                dataSourceIdentifier: lazy-editor-test
    ```

    **Do not forget to set the property type to `array`.**
4. In your `DataSource` implementation on the server, use the `LazyDataSourceTrait` and implement the two methods `getDataForIdentifiers()`and `searchData()`. Do not implement `getData()` (as this is provided by the trait).

    - `getDataForIdentifiers()` is called during the initial call, when the client-side needs to resolve entries for certain identifiers.
    - `searchData()` is called when the user has entered a search term, and needs to perform the searching.

    The return value for both methods needs to be the same as for normal data sources.

    Example:

    ```
     use Neos\Neos\Service\DataSource\AbstractDataSource;
     use Neos\ContentRepository\Domain\Model\NodeInterface;

     class MyLazyDataSource extends AbstractDataSource
     {

         use LazyDataSourceTrait;

         static protected $identifier = 'lazy-editor-test';

         protected function getDataForIdentifiers(array $identifiers, NodeInterface $node = null, array $arguments = [])
         {
             $options = [];
             foreach ($identifiers as $id) {
                 $options[$id] = ['label' => 'My Label for ' . $id];
             }
             return $options;
         }

         protected function searchData(string $searchTerm, NodeInterface $node = null, array $arguments = [])
         {
             $options = [];
             $options['key'] = ['label' => 'My Label ' . $searchTerm];
             return $options;
         }
     }
    ```

Development
-----------

[](#development)

This project works with yarn. The build process given by the neos developers is not very configurable, only the target dir for the buildprocess is adjustable by package.json.

```
nvm install
```

If you don't have [yarn](https://yarnpkg.com/lang/en/docs/install/) already installed:

```
brew install yarn
```

Build the app:

```
./dev.sh setup
./dev.sh build
```

Contribute
----------

[](#contribute)

You are very welcome to contribute by merge requests, adding issues etc.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance45

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~327 days

Recently: every ~159 days

Total

6

Last Release

378d ago

Major Versions

1.1.1 → 2.0.02023-09-14

2.0.1 → 3.02025-05-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ced0d63cfdae881c32128c7f66451a013d3e24d9eed210d6a846b6d8e95fa3b?d=identicon)[sandstorm](/maintainers/sandstorm)

---

Top Contributors

[![Sebobo](https://avatars.githubusercontent.com/u/596967?v=4)](https://github.com/Sebobo "Sebobo (8 commits)")[![jonnitto](https://avatars.githubusercontent.com/u/4510166?v=4)](https://github.com/jonnitto "jonnitto (5 commits)")[![skurfuerst](https://avatars.githubusercontent.com/u/190777?v=4)](https://github.com/skurfuerst "skurfuerst (5 commits)")[![markusguenther](https://avatars.githubusercontent.com/u/1014126?v=4)](https://github.com/markusguenther "markusguenther (3 commits)")[![JamesAlias](https://avatars.githubusercontent.com/u/1615332?v=4)](https://github.com/JamesAlias "JamesAlias (2 commits)")

---

Tags

reactNeos

### Embed Badge

![Health badge](/badges/sandstorm-lazydatasource/health.svg)

```
[![Health](https://phpackages.com/badges/sandstorm-lazydatasource/health.svg)](https://phpackages.com/packages/sandstorm-lazydatasource)
```

###  Alternatives

[ijpatricio/mingle

Use Vue and React in Laravel Livewire Applications.

43445.4k2](/packages/ijpatricio-mingle)[talyssonoc/react-laravel

Package to use ReactJS with Laravel

8944.9k](/packages/talyssonoc-react-laravel)[shel/neos-colorpicker

A plugin for Neos CMS which provides a colorpicker editor

1494.4k6](/packages/shel-neos-colorpicker)[shel/neos-hyphens

A plugin for Neos CMS which provides hyphens for the inline editor

20200.7k1](/packages/shel-neos-hyphens)[techdivision/ckstyles

Neos package which enables you adding your custom style classes for the CkEditor with a simple Yaml configuration

21166.3k](/packages/techdivision-ckstyles)[moc/notfound

Neos CMS package that loads a normal editable page for displaying a 404 error

18167.5k](/packages/moc-notfound)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
