$arSort = array("PROPERTY_NOSKLAD"=>"ASC", "PROPERTY_PRIORITET"=>"DESC", "shows"=>"DESC");
if (
isset($_GET["sort"]) && isset($_GET["method"]) && (
$_GET["sort"] == "name" ||
$_GET["sort"] == "catalog_PRICE_1" ||
$_GET["sort"] == "shows" ||
$_GET["sort"] == "created")){
$arSort = array($_GET["sort"]=>$_GET["method"]);
}
$res = CIBlockElement::GetList($arSort, Array($arrFilter, $arFilter), false, Array("bShowAll"=>false, "nPageSize"=>18, "iNumPage"=>$pn), $arSelect);
<Droppable droppableId="droppable2" type="LIST">
....
onDragEnd(result) {
....
console.log(result.destination.droppableId, result);
if(result.destination.droppableId === 'droppable2') {
// переместить в this.state.items2, или еще как-нибудь отметить позицию айтема
}
.....
}
type: A TypeId(string) that can be used to simply accept only the specified class of <Draggable />. <Draggable />s always inherit type from the <Droppable /> they are defined in.
For example, if you use the type PERSON then it will only allow <Draggable />s of type PERSON to be dropped on itself.
<Draggable />s of type TASK would not be able to be dropped on a <Droppable /> with type PERSON.
If no type is provided, it will be set to 'DEFAULT'.
RewriteRule ^/
<VirtualHost>
./
.RewriteRule ^first/second/$ https://site.com/first/target/ [R=301,L]
var o = {a:1, d:4, b:2, c:3};
Object.keys(o);
// Array(4) [ "a", "d", "b", "c" ]
var o = {a:1, d:4, b:2, c:3};
Object.keys(o).sort();
// Array(4) [ "a", "b", "c", "d" ]
const obj = {}
obj['z'] = {}
obj['a'] = {}
obj['b'] = {}
for (var property in obj) {
if (obj.hasOwnProperty(property)) {
console.log(property) // "z" "a" "b"
}
}
obj['1'] = {}
obj['0'] = {}
for (var property in obj) {
if (obj.hasOwnProperty(property)) {
console.log(property) // "0" "1" "z" "a" "b"
}
}
const map = new Map()
map.set('z', {})
map.set('a', {})
map.set('b', {})
map.forEach((val, key) => {
console.log(key) // "z" "a" "b"
})
map.set('1', {})
map.set('0', {})
map.forEach((val, key) => {
console.log(key) // "z" "a" "b" "1" "0"
})