exposed the label property (#4988)

This commit is contained in:
Manish Kushare 2022-12-15 18:49:53 +05:30 committed by GitHub
parent 3d6b8fedd9
commit 7bf260b7fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -87,6 +87,11 @@ export const DropDown = function DropDown({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [JSON.stringify(values)]);
useEffect(() => {
setExposedVariable('label', label);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [label]);
const onSearchTextChange = (searchText, actionProps) => {
if (actionProps.action === 'input-change') {
setExposedVariable('searchText', searchText);

View file

@ -2321,6 +2321,7 @@ export const widgets = [
exposedVariables: {
value: 2,
searchText: '',
label: 'Select',
},
actions: [
{