Remove checkbox-menu Ag-Grid - VueJs - NodeJs - node.js

I need to remove this checkbox from my menu, can anyone help me?
I am using "VueJS".
My current code:
{
headerName: "",
width: 30,
checkboxSelection: true,
suppressMenu: true,
filter: false,
floatingFilterComponentParams: { suppressFilterButton: true }
},
https://prnt.sc/q8d4ci

Related

My vs code will flicker when I save. I turned on black and flake8 and formatonSave. Why does it flicker? How to stop it?

I have the following workspace settings for my Django project in VSCODE.
{
"folders": [
{
"path": "."
}
],
"settings": {
"python.pythonPath": "/Users/kim/.pyenv/versions/3.7.7/bin/python3.7",
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.tabSize": 4,
"[javascript]": {
"editor.tabSize": 2
},
"[json]": {
"editor.tabSize": 2
},
"[markdown]": {
"editor.tabSize": 2
},
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintArgs": ["--enable=unused-import", "--enable=W0614"],
"python.formatting.provider": "black",
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"workbench.iconTheme": "vscode-icons",
"editor.formatOnSave": true
}
}
You can see how it flickers as I press Cmd+S to save the file. From this gif
Why does this flickering happen? I can understand if it happens once. But it will flicker back and forth. As if vscode is formatting on save between two different formats and cannot make its mind.
How do I properly solve this issue?
Ok I realized I found the issue and solution.
Basically the issue is that there are two formatters used to sort the imports.
I use the answer in this github comment
https://github.com/microsoft/vscode-python/issues/6933#issuecomment-543059396
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.python": true
}
},
"python.formatting.blackArgs": ["--line-length", "88"],
"python.sortImports.args": [
"--multi-line=3",
"--trailing-comma",
"--force-grid-wrap=0",
"--use-parentheses",
"--line-width=88",
],
Notice I change the organizeImports to organizeImports.python.
Also I added a "python.formatting.blackArgs": ["--line-length", "88"]. This is to be consistent with the line-length.
It was suggested in another issue for the same problem. I tried that alone but didn't work. So I combined that with the sortImports args

MongoDB query that contain at least one of filters specified in an object

I have a collection in MongoDB that is structured like this:
"5d33488672886334cd21904xx": {
"ownerId": "5d333551k99951924fb3208",
"createdAt": 1582456098,
....phone
....email
....etc
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"washing": true,
"houseSitting": true,
"dogSitting": true,
"training": true,
"trainingEquipment": true,
"selectionAdvice": true,
"institutionsBusinesses": true
}
}
"5d33488672886334cd21904xx": {
"ownerId": "5d333d344d46ed924fb3208",
"createdAt": 99999995,
....phone
....email
....etc
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"washing": false,
"houseSitting": false,
"dogSitting": false,
"training": true,
"trainingEquipment": false,
"selectionAdvice": true,
"institutionsBusinesses": true
}
}
i am sending filters from the front end like so :
{
"filters": {
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"washing": false,
"houseSitting": true,
"dogSitting": true,
"training": true,
"trainingEquipment": true,
"selectionAdvice": false,
"institutionsBusinesses": true
}
}
}
i want to get all the documents that answer the filters and not EXACT match .
Example:
if i am a dog walker service named "Xdog" , who give all the 6/6 activities (secActivities)
in the front end , when user select 2/6 filters i miss this "Xdog" service.
i get to a function who return only the document that specify EXACT match and its not good because
i am missing the services who actually answer this 2/6 filters..
right now i am sending and spreading the "filterBy" variable into the find() function .
Any suggestion would be great i am weak in Databases commands.
Sorry for my poor English!
The way to do partial match is with $or, but I don't think that will do what you actually want.
The example query you showed above is looking for dog walking services that do not provide washing or selectionAdvice services. Your description suggests that you do not want to consider these 2 services because the user did not specify them. In that case, leave these 2 out of the query entirely, using the user selections to add only the relevant fields, like:
.find({
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"houseSitting": true,
"dogSitting": true,
"training": true,
"trainingEquipment": true,
"institutionsBusinesses": true
}
}
If the filters object is already built, you would need to remove the properties that are false. See How do I remove a property from a JavaScript object?

How to delete a column in dojox/grid/EnhancedGrid

Do we have any way to delete a column in dojox/grid/EnhancedGrid. Please let us know if there is any solution for this.
Please find my sample grid.
Details: it creates a dojox/grid/EnhancedGrid and has an action associated with clicking a header row. What action can I add to delete the column?
var dataStore = new ObjectStore({objectStore: objectStoreMemory});
// grid
grid = new EnhancedGrid({
selectable: true,
store: dataStore,
structure : [ {
name : "Country",
field : "Country",
width : "150px",
reorderable: false,
editable : true
}, {
name : "Abbreviation",
field : "Abbreviation",
width : "120px",
reorderable: false,
editable : true
}, {
name : "Capital",
field : "Capital",
width : "100%",
reorderable: false,
editable : true
} ],
rowSelector: '20px',
plugins: {
pagination: {
pageSizes: ["10", "25", "50", "100"],
description: true,
sizeSwitch: true,
pageStepper: true,
gotoButton: true,
maxPageStep: 5,
position: "bottom"
}
},
dodblclick: function() {
alert("Header clicked");
}
}, "grid");
grid.startup();
you need to use the method
grid.setStructure(newLayout);
or
grid.set('structure',newLayout);
here newLayout is the layout that you need to create without the columns that you need.
Hope this helps.

Remove line in the graph - highcharts

I'm not finding the Highcharts API http://api.highcharts.com/. How do I remove these two lines are off the chart.
http://www.likecomunicacao.com.br/clientes/playtv/grafico/grafico2.html
Does anyone know?
You need to turn off the dataLabels for the Pie. They are on by default.
plotOptions: {
pie: {
innerSize: '70%',
dataLabels: {
enabled: false
}
},
series: {
enableMouseTracking: false,
}
},

Search is not working with filter toolbar in JQGrid

I am facing issue while loaidng the data in JQGrid at a later stage in place of at the time of ceating grid. I am using filter toolbar for search.
following is the code I am using:
Creating Grid
jQuery("#list").jqGrid({
datatype: 'local',
colNames: [my col names],
colModel: [my col model],
jsonReader: {
root: "rows",
page: "page",
total: "total",
//records: "records",
repeatitems: false
},
height: 300,
viewrecords: true,
gridComplete: this.onGridComplete,
ondblClickRow: this.rowDblClick,
onSelectRow: this.selectRow,
headertitles: false,
loadtext: "Loading...",
sortable: true,
altRows: true,
loadonce: true,
rowNum: 100,
pager: '#pager',
root: "rows",
rowList: [100, 200, 300],
pagination: true,
ignoreCase: true
})
Load data at later stage
if(gridDataStr != "none") // gridDatStr has data
{
grid.initialize(); // create the grid
var myjsongrid = JSON.parse(gridDataStr);
grid.table[0].addJSONData(myjsongrid);
grid.table.jqGrid('setGridParam',{datatype:'json', data:myjsongrid}).trigger('reloadGrid');
if (myjsongrid["rows"].length > 1)
{
grid.table.filterToolbar({
stringResult: true,
searchOnEnter: false
});
}
}
However if I load the same data at the time of creating the grid with datatype:json and using some valid url, searching is working well.
Any suggestions?
The method addJSONData can not be used to work with the jqGrid having the 'local' datatype.
You can use addRowData and to use localReader instead of jsonReader or set data parameter of jqGrid with respect of setGridParam method and then call jQuery("#list")[0].refreshIndex() (see here) and reload the grid.

Resources