Comments (9)
Hi @ravikadri :)
Just to ensure I understand, do you mean when you apply a View Formatting Def, your wanting to be able to select multiple items?
There is a 'hideSelection' property that can be set to false and this allows you to select multiple row's when you apply a View Formatting definition. It would look like this:
"hideSelection": false
Here is what it looks like with true:
Here is what it looks like with false. There might be some additional formatting needing to apply to make sure it looks how you want.
I might be completely off base in my analysis of your question, so feel free to let me know if I'm completely wrong... :)
from list-formatting.
Thank you for prompt reply. Appreciated. I am performing this in OOB Library and also attached the JSON file for reference. Let me know, your thought on this.
Steps to reproduce.
Create an OOB Document Library and upload some sample images. Copy the attached JSON file for view formatting.
Here are my few observations
Scenario 1: With parameter option I see this has no effect on the item selection.
"hideSelection": "false",
"hideListHeader": "true",
Scenario 2:
Removed both parameters and I see the item selection option. But now all the images are stacked and donβt show them tiles structure. Not sure if this is the default behavior? I am trying to get the the Item selection with items in Tiles layout.
Thanks!
Ravi
from list-formatting.
I think it is a bug. Here is the link to Chris bug. https://github.com/SharePoint/sp-dev-docs/issues/2395
from list-formatting.
I see, ok cool. So just to be sure I'm not misunderstanding, your looking for a View Formatting Definition which more closely aligns with the tile structure?
For your scenario 2, be sure that your "hideSelection" and "hideListHeader" values for true/false are not enclosed in quotes ("), or they are perceived as string's. So it should look like this:
"hideSelection": false,
"hideListHeader": true,
When you override the view, you essentially control all of the HTML, so any styling, structure, layout desired would have to be applied using desired HTML and inline CSS to create that structure.
That being said, I too see how when "hideSelection" is set to false, that it does force them onto individual rows. Let me see what I can test. I see the error Chris is pointing to and that might have some relation, but I'm not sure it's fully applicable here. His issue is around hiding the selection, BUT still being able to select all.
Let me play around with some JSON to see if we can achieve what your looking for. :)
from list-formatting.
Sure David. Thank you for testing out. I am also investigating this behavior and will update here.
Thanks again!
Ravi
from list-formatting.
@PopWarner ,
Below are my observations.
Adding "hideSelection:false" adds additional css and makes the items to appear in row. Looks like this is the default behavior.
Also, "hideListHeader" is valid only for List and this parameter has no affect on Library. For Library, i see we have verb "hideLibraryHeader" . I haven't information about this on MS documentation. :(
Ravi
from list-formatting.
@ravikadri, Yes, I would agree what your seeing on the hideSelection property being the default behavior.
When you look at the tile option you are trying to emulate, I see the "selection checkmark" is inside the item itself, but when using the View Formatting option, the selection checkmark is outside the HTML generated by the list view.
from list-formatting.
@PopWarner ,
Agreed.
@thechriskent ,
Hope will have some detailed response from Microsoft on this query.
Thanks!
Ravi
from list-formatting.
@ravikadri you are correct that the tile view (float:left
) approach breaks down when selection is allowed. As pointed out by you and @PopWarner this is because the row is wrapped in a container to allow selection that prevents the float:left
trick from working.
In reality, the tile trick causes some other issues (#108 & #113) and I don't think it is an intended scenario. However, it is a pretty awesome approach for a relatively small number of items in a view. I'd like to see both the scrolling and selection issues addressed since this trick is both possible and wanted by lots of users.
I'm not sure I understand your comments about hideListHeader
. That is an old attribute (it still works for backwards compatibility). hideColumnHeader
should be used instead. There has never been a hideLibraryHeader
. Regardless, I find that both attributes (hideListHeader
or hideColumnHeader
) work across lists and libraries without issue. Are you having trouble using this with a document library?
Although I agree that the selection breaking the tiles format is an unfortunate side effect and possible bug, this issues list is for issues with the samples themselves not with how List Formatting is implemented. So I will close this issue here. However, I encourage you to raise this issue (feel free to reference this one) on the official issues list here: https://aka.ms/spdev-issues
from list-formatting.
Related Issues (20)
- Disable Click Action - Still Opens Item HOT 2
- Bug in "multi-person-reaction" HOT 10
- I have a question about FAQ Accordion HOT 1
- Document Library Approval Status HOT 1
- I have a question about the Discussion Board sample. HOT 3
- date-page-a-day-calendar displays day before in central time zone HOT 2
- Cannot embed video from SharePoint HOT 1
- Displaying a new column which is a hyperlink in list formatting HOT 12
- document-library-thumbnails not all documents are previewing HOT 8
- Unable to update column containing deleted user with setValue HOT 1
- Sample - yesno-icon-color not working as intended HOT 4
- I have a question about honeycomb-link when used with an embedded webpart HOT 2
- I have a question about formatting a column that contains a JSON string HOT 2
- I have a question about JSON code in lists HOT 2
- Generic Gantt chart - Date field cannot be edited HOT 5
- Birthday Sample, does not populate birthday. HOT 3
- No longer works as it used to: form-samples/wrapped-body HOT 2
- Gallery View: Scaling of SVG files HOT 1
- honeycomb SAMPLE has made me sad, please help HOT 6
- Changes made by GENERIC-UPDATE-BUTTON are not immediately visible to other users 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 list-formatting.