Is there a way to disable pagination as a whole? I want all my records to show up in one long list and not broken up into pages. I am using ListGuesser right now, and i have tried with both List and ListGuesser but i am unable disable pagination. Actually react-admin expects X-Total-Count from the server side and i don't want to introduce pagination, but i am bound to pass this in header to make it work. So is there any way to disable pagination?
<Resource name="posts" list={ListGuesser} edit={EditGuesser}/>
There is a Simple Way to Disable Pagination. Set pagination={false} in List.
This works for me. And if you want to show more then 25 records on a page set perPage={100} or any no of value.
I don't know how long list react-admin support but it should work for like 500-1000 records.
Related
I have below two vuejs page. I created filters in my list page like search by user name and email. The filter is working fine, but the issue is when I type something in my search box and search it's working but after that when clicking on the edit user link and after that comes back to the list page the filter is removed and it shows me all data. My question is how can I remember the search I just need suggestions on how can I achieve that.
localstorage or vuex possible solution for that?
1. List of users
2. Edit User
The solution is to save the filter in a vuex state that way it doesnt change when u go back as long as you're still in the same tab and didnt close it.
If you don't refresh the page and navigate between the route's components, it's best to use Vuex, and on the other hand, if you want the same search results to be stored and retrieved even after refreshing the page, use the localStorage.
Furthermore, Vuex would be good to store large lists of data instead of localStorage.
I have a CListView with pagination showing all results. Everything works fine.
I have a search widget on the page that renders a partial view to replace the existing list with search results.
The first search result page loads, looks great, and even shows the correct number of results in pagination, but if I try to go to one of the next pages, items from the first list are loaded.
Does anyone know what I have to do in order to fix this? Do the search results need their own full view rendered?
Thanks you in advance.
I was mistaken.
The pagination was not linking to the previous result, it was loading everything which the previous result also does, which is why I was mistaken.
I thought that the data provider in the controller kept track of the result set but you have to keep resending the same criteria every time. I was sending the criteria the first time and not on subsequent results so it loaded everything in absence of any constraints. I simply put the search parameters in session and then retrieved them so they could be considered on every request and it fixed the problem.
In short there is no bug, just me being new working with Yii.
I would like to create some logic with in my Rails app that is using ActiveAdmin backend and I'm not sure if it's possible or not.
Basically I'm wanting to give each AdminUser a new property called client_id. When the user logs in I would like to filter what is shown to them in the header menu.
Each item in the header will all have a "client_id" so that I can filter them.
It's possible, but you'll be doing a bit of custom stuff to get that working.
I'd suggest you would be way better off just rolling your own admin setup. You're going to jump through hoops and do some hackery that doesn't feel right to make everything play nice.
I have been using CGridView without any issues previously but when I use Bootstrap extension the filters stop working.
Moreover the Ajax requests for CButtonColumn are set to use POST but when I use BootButtonColumn it uses GET and ignores the fact that ajax type is set to POST
Any ideas on how to fix the problems.
I went back to using zii widgets but today looking at the documentation for a totally unrelated reason I came across this property "ajaxUpdate". Below is the excerpt from Yii documentation.
ajaxUpdate property
public mixed $ajaxUpdate;
the ID of the container whose content may be updated with an AJAX response. Defaults to null, meaning the container for this grid view instance. If it is set false, it means sorting and pagination will be performed in normal page requests instead of AJAX requests. If the sorting and pagination should trigger the update of multiple containers' content in AJAX fashion, these container IDs may be listed here (separated with comma).
I am no longer using that extension but I am posting it here so that it maybe helpful to someone else.
My client wants me to make a plugin that intercepts the banner on a WordPress blog so that the existing one displays, but right beneath it, above the content and the sidebar, another banner appears. And he needs it such that it works in most themes and isn't theme-specific.
I found I could use add_action('loop_start','interceptMe') to put something at the top before posts or a single post, but it still left the sidebar on the right. I have tried using add_action('all','test') to dump out different intercepts to see if I could figure this out, but I just can't seem to get it yet. I'm thinking I may have to intercept all esc_html calls and contextually inspect that until I find one used for the banner.
Does anyone know how to intercept the banner to add another one right beneath it?
This is going to be very challenging to do. There's no consistent structure, HTML, or CSS IDs that would allow you to do cross-theme injection like this (hell, some themes don't have a header image). You will likely need to make manual changes to each theme for this.
I suppose you might insert some JavaScript that looks for an H1 tag and inserts your banner right after it. Ceejayoz is right though -- there's not consistency to different themes. One theme might use H1 for the site header and another for a Post title.