refactor(word-cloud): convert rotation and color controls to React components (POC) (#36275)

Co-authored-by: BrandanBurgess <brandanbb13@gmail.com>
This commit is contained in:
OrhanBC
2025-11-28 15:28:31 -05:00
committed by GitHub
parent c9a7a85159
commit d5c5dbb3bf
13 changed files with 863 additions and 22 deletions

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ReactNode } from 'react';
import React, { ReactNode } from 'react';
import {
DatasourceType,
ensureIsArray,
@@ -182,6 +182,14 @@ export function getAllControlsState(
state,
formData[name],
);
} else if (React.isValidElement(field)) {
const props = field.props as { name: string; [key: string]: any };
const { name, ...configProps } = props;
controlsState[name] = getControlStateFromControlConfig(
configProps as ControlConfig<any>,
state,
formData[name],
);
}
}),
);