Skip to content

Commit

Permalink
Fixed #4985 - metaKeySelection default type is changed as false
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Dec 20, 2023
1 parent ff272de commit bb82382
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion components/lib/datatable/BaseDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default {
},
metaKeySelection: {
type: Boolean,
default: true
default: false
},
contextMenu: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/listbox/BaseListbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
},
metaKeySelection: {
type: Boolean,
default: true
default: false
},
filter: Boolean,
filterPlaceholder: String,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/orderlist/BaseOrderList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
},
metaKeySelection: {
type: Boolean,
default: true
default: false
},
responsive: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/picklist/BasePickList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
},
metaKeySelection: {
type: Boolean,
default: true
default: false
},
responsive: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/tree/BaseTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
},
metaKeySelection: {
type: Boolean,
default: true
default: false
},
loading: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/treeselect/BaseTreeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {
},
metaKeySelection: {
type: Boolean,
default: true
default: false
},
inputId: {
type: String,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/treetable/BaseTreeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
},
metaKeySelection: {
type: Boolean,
default: true
default: false
},
rows: {
type: Number,
Expand Down
5 changes: 1 addition & 4 deletions doc/datatable/rowselection/CheckboxRowSelectionDoc.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
More than one row is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is necessary to add to existing selections however this can be configured with
disabling the <i>metaKeySelection</i> property. Note that in touch enabled devices, DataTable always ignores metaKey.
</p>
<p>Specifying <i>selectionMode</i> as <i>multiple</i> on a Column, displays a checkbox inside that column for selection.</p>
<p>The header checkbox toggles the selection state of the whole dataset by default, when paginator is enabled you may add <i>selectAll</i> property and <i>select-all-change</i> event to only control the selection of visible rows.</p>
</DocSectionText>
<div class="card">
Expand Down
4 changes: 2 additions & 2 deletions doc/datatable/rowselection/MultipleRowsSelectionDoc.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
More than one row is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is necessary to add to existing selections however this can be configured with
disabling the <i>metaKeySelection</i> property. Note that in touch enabled devices, DataTable always ignores metaKey.
More than one row is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is not necessary to add to existing selections. When the optional
<i>metaKeySelection</i> is present, behavior is changed in a way that selecting a new row requires meta key to be present. Note that in touch enabled devices, DataTable always ignores metaKey.
</p>
</DocSectionText>
<div class="card">
Expand Down
8 changes: 4 additions & 4 deletions doc/listbox/MultipleDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Listbox v-model="selectedCity" :options="cities" multiple metaKeySelection optionLabel="name" class="w-full md:w-14rem" />
<Listbox v-model="selectedCity" :options="cities" multiple optionLabel="name" class="w-full md:w-14rem" />
</div>
<DocSectionCode :code="code" />
</template>
Expand All @@ -25,12 +25,12 @@ export default {
],
code: {
basic: `
<Listbox v-model="selectedCity" :options="cities" multiple metaKeySelection optionLabel="name" class="w-full md:w-14rem" />
<Listbox v-model="selectedCity" :options="cities" multiple optionLabel="name" class="w-full md:w-14rem" />
`,
options: `
<template>
<div class="card flex justify-content-center">
<Listbox v-model="selectedCity" :options="cities" multiple metaKeySelection optionLabel="name" class="w-full md:w-14rem" />
<Listbox v-model="selectedCity" :options="cities" multiple optionLabel="name" class="w-full md:w-14rem" />
</div>
</template>
Expand All @@ -54,7 +54,7 @@ export default {
composition: `
<template>
<div class="card flex justify-content-center">
<Listbox v-model="selectedCity" :options="cities" multiple metaKeySelection optionLabel="name" class="w-full md:w-14rem" />
<Listbox v-model="selectedCity" :options="cities" multiple optionLabel="name" class="w-full md:w-14rem" />
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions doc/tree/selection/MultipleDoc.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
More than one node is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is necessary to add to existing selections however this can be configured with
disabling the <i>metaKeySelection</i> property. Note that in touch enabled devices, Tree always ignores metaKey.
More than one node is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is not necessary to add to existing selections. When the optional
<i>metaKeySelection</i> is present, behavior is changed in a way that selecting a new node requires meta key to be present. Note that in touch enabled devices, Tree always ignores metaKey.
</p>
<p>In multiple selection mode, value binding should be a key-value pair where key is the node key and value is a boolean to indicate selection.</p>
</DocSectionText>
Expand Down
12 changes: 6 additions & 6 deletions doc/treeselect/MultipleDoc.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
More than one node is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is necessary to add to existing selections however this can be configured with
disabling the <i>metaKeySelection</i> property. Note that in touch enabled devices, TreeSelect always ignores metaKey.
More than one node is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is not necessary to add to existing selections. When the optional
<i>metaKeySelection</i> is present, behavior is changed in a way that selecting a new node requires meta key to be present. Note that in touch enabled devices, TreeSelect always ignores metaKey.
</p>
<p>In multiple selection mode, value binding should be a key-value pair where key is the node key and value is a boolean to indicate selection.</p>
</DocSectionText>
<DocSectionCode :code="activeNodes" hideToggleCode importCode hideCodeSandbox hideStackBlitz v-bind="$attrs" />
<div class="card flex justify-content-center">
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" :metaKeySelection="false" placeholder="Select Items" class="md:w-20rem w-full" />
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" placeholder="Select Items" class="md:w-20rem w-full" />
</div>
<DocSectionCode :code="code" :service="['NodeService']" v-bind="$attrs" />
</template>
Expand All @@ -30,12 +30,12 @@ export default {
},
code: {
basic: `
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" :metaKeySelection="false" placeholder="Select Item" class="md:w-20rem w-full" />
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" placeholder="Select Item" class="md:w-20rem w-full" />
`,
options: `
<template>
<div class="card flex justify-content-center">
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" :metaKeySelection="false" placeholder="Select Item" class="md:w-20rem w-full" />
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" placeholder="Select Item" class="md:w-20rem w-full" />
</div>
</template>
Expand All @@ -58,7 +58,7 @@ export default {
composition: `
<template>
<div class="card flex justify-content-center">
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" :metaKeySelection="false" placeholder="Select Item" class="md:w-20rem w-full" />
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="multiple" placeholder="Select Item" class="md:w-20rem w-full" />
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions doc/treetable/selection/MultipleRowsSelectionDoc.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
More than one node is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is necessary to add to existing selections however this can be configured with
disabling the <i>metaKeySelection</i> property. Note that in touch enabled devices, TreeTable always ignores metaKey.
More than one node is selectable by setting <i>selectionMode</i> to <i>multiple</i>. By default in multiple selection mode, metaKey press (e.g. <i>⌘</i>) is not necessary to add to existing selections. When the optional
<i>metaKeySelection</i> is present, behavior is changed in a way that selecting a new node requires meta key to be present. Note that in touch enabled devices, TreeTable always ignores metaKey.
</p>
<p>In multiple selection mode, value binding should be a key-value pair where key is the node key and value is a boolean to indicate selection.</p>
</DocSectionText>
Expand Down

0 comments on commit bb82382

Please sign in to comment.