@policystudio/policy-studio-ui-vue 1.1.82 → 1.1.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2495,7 +2495,7 @@ video {
2495
2495
 
2496
2496
  .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th:first-child {
2497
2497
  text-align: left;
2498
- max-width: 330px;
2498
+ min-width: 330px;
2499
2499
  padding-left: 0;
2500
2500
  }
2501
2501
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.82",
3
+ "version": "1.1.84",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -442,7 +442,7 @@
442
442
 
443
443
  &:first-child {
444
444
  @apply psui-text-left;
445
- max-width: 330px;
445
+ min-width: 330px;
446
446
  padding-left: 0;
447
447
  }
448
448
 
@@ -519,15 +519,12 @@ export default {
519
519
  return !item.is_disabled && item.deep != 0 ? '#ECF7FB' : item.is_disabled && item.deep != 0 ? '#E6ECF2' : ''
520
520
  },
521
521
  setCollapsedRows() {
522
- if ( this.itemsHiddenIndexes ) {
523
- this.collapsedRows = [...this.itemsHiddenIndexes]
524
- return
525
- }
526
-
527
- const newRowsCollpased = []
528
- if ( this.showRowsCollapsed ) {
522
+ const newRowsCollpased = [...(this.itemsHiddenIndexes || [])]
523
+ if ( this.showRowsCollapsed || this.layout === 'flexible' ) {
529
524
  this.getRows.forEach(element => {
530
- if ( element?.items?.length && ( this.customLevelOpened == null || element.index.split('-').length > this.customLevelOpened)) {
525
+ const matchForAll = Boolean( element?.items?.length && ( this.customLevelOpened == null || element.index.split('-').length > this.customLevelOpened))
526
+ const matchForFlexibleLayout = Boolean(element.isCollapsed === true)
527
+ if (matchForAll || matchForFlexibleLayout) {
531
528
  newRowsCollpased.push(element.index)
532
529
  }
533
530
  })
@@ -573,8 +570,10 @@ export default {
573
570
  const index = this.collapsedRows.indexOf(item.index)
574
571
  if(index > -1) {
575
572
  this.collapsedRows.splice(index, 1)
573
+ delete item.isCollapsed
576
574
  } else {
577
575
  this.collapsedRows.push(item.index)
576
+ item.isCollapsed = true
578
577
  }
579
578
  this.$forceUpdate()
580
579
  this.$emit('collapse-row', this.collapsedRows, $event)