Skip to content

Commit

Permalink
PATCH: rename props to clear search on leave (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
LrxGaelle authored Oct 11, 2023
1 parent df75117 commit 5414a7c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/BIMDataComponents/BIMDataSelect/BIMDataSelectMulti.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
type: String,
default: "Search",
},
isResetSearch: {
resetOnLeave: {
type: Boolean,
default: false,
},
Expand Down Expand Up @@ -192,7 +192,7 @@ export default {
this.$emit("update:modelValue", options);
},
resetSearch() {
if (this.isResetSearch) {
if (this.clearSearchOnLeave) {
this.searchText = "";
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/BIMDataComponents/BIMDataSelect/BIMDataSelectSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
type: String,
default: "Search",
},
isResetSearch: {
clearSearchOnLeave: {
type: Boolean,
default: false,
},
Expand Down Expand Up @@ -180,7 +180,7 @@ export default {
return this.optionKey && option && option.optionGroup;
},
resetSearch() {
if (this.isResetSearch) {
if (this.clearSearchOnLeave) {
this.searchText = "";
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/web/views/Components/Select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:optionLabelKey="optionLabelKey"
:nullValue="hasNullValue"
v-model="selection"
:isResetSearch="clearSearch"
:clearSearchOnLeave="clearSearch"
>
<template #empty v-if="isEmpty">
<span class="p-x-6 color-granite">No result</span>
Expand Down Expand Up @@ -104,7 +104,7 @@
{{ isDisabled ? "disabled" : "" }}
{{ isMulti ? ':multi="true"' : "" }}
{{ search ? ':search="true"' : "" }}
{{ clearSearch ? ':isResetSearch="true"' : "" }}
{{ clearSearch ? ':clearSearchOnLeave="true"' : "" }}
width="200px"
label="Selector label"
:options="options"
Expand Down
2 changes: 1 addition & 1 deletion src/web/views/Components/Select/props-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default [
["Name", "Type", "Default value", "Description"],
["disabled", "Boolean", "false", "When true the selector will be disabled."],
[
"isResetSearch",
"clearSearchOnLeave",
"Boolean",
"false",
"In multi-selection mode: clear search bar on click away. In single selection: clear search bar on select element or click away.",
Expand Down

0 comments on commit 5414a7c

Please sign in to comment.