Comments (5)
Heyo, that seems like something that can be achieved with binds, could you please provide me with an example in pseudocode?
If this is what i'm guessing it is, you could use inheritance from a base form class that loops instance variables of the child class and generates both a form and a backend for it. That would be an awesome idea for an open source project
from nullstack.
heyo,
As CSS describes the layout, this could describe the fields, for a form;
As a initial draft, using regex for validation, show before box, view is ids for css, namedb is the name for use in back-end, etc. Could define some defaults before translate, maybe using a 'default' ;)
layout : {
record : {
'form' : { 'name' : 'uuid },
'name' : { 'validate' : '[a-z]{6-16}' , 'show' : ' Name or Nickname : ', 'view' : ' css id' , 'namedb' : ' ftu_user_lite' },
'age' : { 'validade' : '[0-9][0-9]' , 'show' : ' Age from 1970 : ', 'view' : 'css id', 'namedb' : 'ftu_ages_seth' },
'zip' : { 'validade', '[0-9]{2}.[0-9]{4}.[0-9]{4}' , 'show' : 'Where to send : ', 'view' : '** css id **' , 'namedb' : 'ftu_zip_lost' }
}
}
from nullstack.
This would be a cool opensource class that extends Nullstack
You could achieve this by doing a map on each key and binding it like <input bind={record[key]} />
from nullstack.
from nullstack.
The standard key could be a static attribute in the class (not async) which would be accessible in all environments.
In this example resource would be your library that extends Nullstack and is extendable and generates a crud from a custom schema:
import Resource from './Resource';
class Page extends Resource {
static schema = {
title: '',
slug: '',
content: ''
}
static collection = 'pages';
static redirect = '/pages';
static title = 'Create Page';
static required = ['title', 'slug'];
}
export default Page;
It could also have more complexes schemas like the JSON you mentioned.
I'm going to mark the issue as resolved since the tools to create this are present in Nullstack, but would love to see opensource packages making this work out of the box, if you end up creating one please keep me posted
from nullstack.
Related Issues (20)
- RevisΓ£o do readme.md HOT 2
- Recive props render in statefull component dosen't work HOT 1
- M1 Mac issue with node v16 fiber HOT 3
- this.renderNullstack returning undefined HOT 1
- Does support a vite template? HOT 1
- Typescript error: Not export *.d.ts types HOT 2
- onfocus/onblur don't work together on production mode HOT 2
- textarea attribute "disabled" won't update it's value when tied to nullstack state HOT 1
- meta tag description is no longer updated HOT 1
- Textarea doesn't accept bind as undefined HOT 2
- M1 - postcss loader breaks HOT 5
- Description header not be apply HOT 5
- .env variables not be referenced as a value HOT 2
- Using spread operator in combination with onclick on tag prop breaks the build HOT 3
- π Error thrown when using exposed server function with HTTP POST method HOT 1
- Output folder is not being cleaned up with --disk flag HOT 1
- The `onerror` event in `img` elements isn't being triggered correctly when SSR is involved HOT 3
- Comments not being respected by sass-loader HOT 1
- Refs are not properly typed HOT 1
- 0.18+ not reloading function components HOT 2
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 nullstack.