Comments (11)
Maybe it's an issue with autopublish. Can you try updating all dependencies and removing autopublish before dig in into this problem
from orioncms.
I updated the dependencies and removed autopublish but index table structure is still behaving the same. The table structure of the first entity selected seems to persist while navigating between other entities.
from orioncms.
Ok. I will fix this tonight
from orioncms.
Sorry, aldeed:tabular
is too buggy. I'm thinking in changing it.
from orioncms.
Hope you find something suitable soon, your package is truly an awesome addition to meteor.
from orioncms.
Didn't fix aldeed:tabular
but I did a trick to make it work.
PD: aldeed:tabular
it's not entirely buggy, but in the tracker topic yes it is
from orioncms.
Updated the package, the edit/delete buttons are gone from the table but I am able to edit and delete by selecting the table element 👍 . Nice fix.
New issue :
I had a select option specified using the format
{value:'labelvalue',label:'labelname'}
and this worked before the update. After updating, no values are available for the select box.
from orioncms.
Sorry, I was using the submit button the wrong way.
from orioncms.
It works!! 👍
P.S - I have a doubt.
When setting up select box, supplying values in the format {value:'labelvalue',label:'labelname'}, everything works perfectly. 👍
But I am setting the select box options by calling function getVenues() and returning all the values in the prescribed format. This just shows an empty select box now. This used to work fine before the update to 0.4.6.
function getVenues() {
var venues = orion.entities.venues.collection.find().fetch();
var venuesmin = [];
_.each(venues,function(item){
venuesmin.push({value:item._id,label:""+item.title+""});
});
if(venuesmin)
return venuesmin;
return [];
}
I configured the select box like this -
orion.addEntity('sports', {
title: {
type: String,
label: "Sport Title",
},
venue: {
type: String,
label: "Venue",
optional: true,
autoform: {
type: 'select',
options :getVenues(),
}
},
}, {
icon: 'cubes',
sidebarName: 'Sports',
pluralName: 'Sports',
singularName: 'Sport',
tableColumns: [
{ data:'title', title: 'Sport' },
{
data:'venue',
title: 'Venue',
render: function(val, type, doc) {
var venuename = orion.entities.venues.collection.findOne({_id:doc.venue},{fields:{title:1}});
if(venuename) return venuename.title;
},
},
]
});
Specifically retrieving the venues entity collection gives me an empty array.
var venues = orion.entities.venues.collection.find().fetch();
console.log(venues) //=> Array[0]
Any ideas as to what I'm messing up?
from orioncms.
It's because you are not subscribed.
Add this line of code in the client
orion.admin.addAdminSubscription(orion.subs.subscribe('entity', 'venues'));
This will subscribe to that entity on every route of the admin
from orioncms.
Yes, that worked. I also had to tweak calling the function to populate options like this
autoform: {
type: 'select',
options : function(){
var venues = orion.entities.venues.collection.find().fetch();
var venuesmin = [];
_.each(venues,function(item){
venuesmin.push({value:item._id,label:item.title});
});
if(venuesmin)
return venuesmin;
return [];
},
}
prior to v0.4.6 I got the values by calling a function defined outside the entity.
from orioncms.
Related Issues (20)
- Cant install orionjs:core HOT 1
- App crashes in ios and android
- can't list accounts HOT 1
- cant't list collection HOT 1
- Hide create, update or delete buttons not working HOT 2
- [email protected] depency broken HOT 1
- Is this project dead? HOT 5
- Website down
- Crash when creating default admin user Error: Match error: Expected string, got object HOT 1
- attribute 'hasMany' does not exist... HOT 2
- TypeError: Cannot read property 'orderable' of undefined HOT 3
- Error when trying to meteor add orionjs:core HOT 3
- Error while try to installing orionjs:core into a fresh app
- How to use orionjs:pages HOT 1
- Orion Pages cant be edited
- Error: You must pass Tabular.Table instance as the table attribute HOT 2
- orion.filesystem.remove on server side
- orion:base is incompatible with the latest roles package
- http://docs.orionjs.org/ is down HOT 3
- i18n new languages not resetting trackers and helper
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 orioncms.